Index: public/platform/WebCryptoAlgorithm.h |
diff --git a/public/platform/WebCryptoAlgorithm.h b/public/platform/WebCryptoAlgorithm.h |
index 68a8640ceb544c866ffbf1b832904ab2842cf3c9..d64fc682173059e0174d0e84d2f9062d300cfcfd 100644 |
--- a/public/platform/WebCryptoAlgorithm.h |
+++ b/public/platform/WebCryptoAlgorithm.h |
@@ -54,7 +54,7 @@ enum WebCryptoAlgorithmId { |
WebCryptoAlgorithmIdAesCtr, |
WebCryptoAlgorithmIdAesKw, |
#if INSIDE_BLINK |
- NumberOfWebCryptoAlgorithmId, |
+ WebCryptoAlgorithmIdLast = WebCryptoAlgorithmIdAesKw, |
#endif |
}; |
@@ -131,6 +131,9 @@ public: |
BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedImportParams* rsaHashedImportParams() const; |
BLINK_PLATFORM_EXPORT const WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGenParams() const; |
+ // Returns true if the provided algorithm ID is for a hash (in other words, SHA-*) |
+ BLINK_PLATFORM_EXPORT static bool isHash(WebCryptoAlgorithmId); |
+ |
private: |
BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); |
BLINK_PLATFORM_EXPORT void reset(); |