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

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

Issue 195543002: [webcrypto] Implement structured clone of keys (blink-side). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix another comment Created 6 years, 9 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
Index: Source/platform/exported/WebCryptoAlgorithm.cpp
diff --git a/Source/platform/exported/WebCryptoAlgorithm.cpp b/Source/platform/exported/WebCryptoAlgorithm.cpp
index ece201a7cc0261de90f92b8109d1f3b30a2987ff..eee27e1c7c5a4fb235496254888ecd75261e5b61 100644
--- a/Source/platform/exported/WebCryptoAlgorithm.cpp
+++ b/Source/platform/exported/WebCryptoAlgorithm.cpp
@@ -163,6 +163,28 @@ const WebCryptoRsaHashedKeyGenParams* WebCryptoAlgorithm::rsaHashedKeyGenParams(
return 0;
}
+bool WebCryptoAlgorithm::isHash(WebCryptoAlgorithmId id)
+{
+ switch (id) {
+ case WebCryptoAlgorithmIdSha1:
+ case WebCryptoAlgorithmIdSha224:
+ case WebCryptoAlgorithmIdSha256:
+ case WebCryptoAlgorithmIdSha384:
+ case WebCryptoAlgorithmIdSha512:
+ return true;
+ case WebCryptoAlgorithmIdAesCbc:
+ case WebCryptoAlgorithmIdHmac:
+ case WebCryptoAlgorithmIdRsaSsaPkcs1v1_5:
+ case WebCryptoAlgorithmIdRsaEsPkcs1v1_5:
+ case WebCryptoAlgorithmIdAesGcm:
+ case WebCryptoAlgorithmIdRsaOaep:
+ case WebCryptoAlgorithmIdAesCtr:
+ case WebCryptoAlgorithmIdAesKw:
+ break;
+ }
+ return false;
+}
+
void WebCryptoAlgorithm::assign(const WebCryptoAlgorithm& other)
{
m_private = other.m_private;

Powered by Google App Engine
This is Rietveld 408576698