Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: Source/platform/exported/WebCryptoAlgorithm.cpp

Issue 179353002: [webcrypto] Add the KeyAlgorithm interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase yet again (another conflict) Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/exported/WebCryptoKey.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/exported/WebCryptoAlgorithm.cpp
diff --git a/Source/platform/exported/WebCryptoAlgorithm.cpp b/Source/platform/exported/WebCryptoAlgorithm.cpp
index 42dd356b974523833200a334daad890f69190293..ece201a7cc0261de90f92b8109d1f3b30a2987ff 100644
--- a/Source/platform/exported/WebCryptoAlgorithm.cpp
+++ b/Source/platform/exported/WebCryptoAlgorithm.cpp
@@ -107,27 +107,19 @@ const WebCryptoAesKeyGenParams* WebCryptoAlgorithm::aesKeyGenParams() const
return 0;
}
-const WebCryptoHmacParams* WebCryptoAlgorithm::hmacParams() const
+const WebCryptoHmacImportParams* WebCryptoAlgorithm::hmacImportParams() const
{
ASSERT(!isNull());
- if (paramsType() == WebCryptoAlgorithmParamsTypeHmacParams)
- return static_cast<WebCryptoHmacParams*>(m_private->params.get());
+ if (paramsType() == WebCryptoAlgorithmParamsTypeHmacImportParams)
+ return static_cast<WebCryptoHmacImportParams*>(m_private->params.get());
return 0;
}
-const WebCryptoHmacKeyParams* WebCryptoAlgorithm::hmacKeyParams() const
+const WebCryptoHmacKeyGenParams* WebCryptoAlgorithm::hmacKeyGenParams() const
{
ASSERT(!isNull());
- if (paramsType() == WebCryptoAlgorithmParamsTypeHmacKeyParams)
- return static_cast<WebCryptoHmacKeyParams*>(m_private->params.get());
- return 0;
-}
-
-const WebCryptoRsaSsaParams* WebCryptoAlgorithm::rsaSsaParams() const
-{
- ASSERT(!isNull());
- if (paramsType() == WebCryptoAlgorithmParamsTypeRsaSsaParams)
- return static_cast<WebCryptoRsaSsaParams*>(m_private->params.get());
+ if (paramsType() == WebCryptoAlgorithmParamsTypeHmacKeyGenParams)
+ return static_cast<WebCryptoHmacKeyGenParams*>(m_private->params.get());
return 0;
}
@@ -155,6 +147,22 @@ const WebCryptoRsaOaepParams* WebCryptoAlgorithm::rsaOaepParams() const
return 0;
}
+const WebCryptoRsaHashedImportParams* WebCryptoAlgorithm::rsaHashedImportParams() const
+{
+ ASSERT(!isNull());
+ if (paramsType() == WebCryptoAlgorithmParamsTypeRsaHashedImportParams)
+ return static_cast<WebCryptoRsaHashedImportParams*>(m_private->params.get());
+ return 0;
+}
+
+const WebCryptoRsaHashedKeyGenParams* WebCryptoAlgorithm::rsaHashedKeyGenParams() const
+{
+ ASSERT(!isNull());
+ if (paramsType() == WebCryptoAlgorithmParamsTypeRsaHashedKeyGenParams)
+ return static_cast<WebCryptoRsaHashedKeyGenParams*>(m_private->params.get());
+ return 0;
+}
+
void WebCryptoAlgorithm::assign(const WebCryptoAlgorithm& other)
{
m_private = other.m_private;
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/exported/WebCryptoKey.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698