Index: Source/platform/exported/WebCryptoAlgorithm.cpp |
diff --git a/Source/platform/exported/WebCryptoAlgorithm.cpp b/Source/platform/exported/WebCryptoAlgorithm.cpp |
index ece201a7cc0261de90f92b8109d1f3b30a2987ff..918a2b8d884112c43607fa6fcc34dd883bd40800 100644 |
--- a/Source/platform/exported/WebCryptoAlgorithm.cpp |
+++ b/Source/platform/exported/WebCryptoAlgorithm.cpp |
@@ -163,6 +163,27 @@ const WebCryptoRsaHashedKeyGenParams* WebCryptoAlgorithm::rsaHashedKeyGenParams( |
return 0; |
} |
+bool WebCryptoAlgorithm::isHash(WebCryptoAlgorithmId id) |
+{ |
+ switch (id) { |
+ case WebCryptoAlgorithmIdSha1: |
+ 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; |