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

Unified Diff: Source/modules/crypto/NormalizeAlgorithm.h

Issue 255453002: [refactor] Use a lookup table rather than binary search for algorithm normalization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/modules/crypto/NormalizeAlgorithm.h
diff --git a/Source/modules/crypto/NormalizeAlgorithm.h b/Source/modules/crypto/NormalizeAlgorithm.h
index abfbc26e86c2c5b3aa5f643f8d8ca6a8e2ec1f50..e4383b05fe8fefa5cda7e3ef4c67af41c3900747 100644
--- a/Source/modules/crypto/NormalizeAlgorithm.h
+++ b/Source/modules/crypto/NormalizeAlgorithm.h
@@ -32,6 +32,7 @@
#define NormalizeAlgorithm_h
#include "public/platform/WebCryptoAlgorithm.h"
+#include "public/platform/WebCryptoKey.h"
#include "wtf/Assertions.h"
#include "wtf/Forward.h"
@@ -74,6 +75,10 @@ bool parseAlgorithm(const Dictionary&, AlgorithmOperation, blink::WebCryptoAlgor
// will be valid for the program's entire runtime.
const char* algorithmIdToName(blink::WebCryptoAlgorithmId);
+// Returns true if the key usages are valid for creating keys for the given
+// algorithm. Otherwise returns false and sets an error on the result.
+bool verifyUsagesAreConsistentForAlgorithm(blink::WebCryptoAlgorithmId, blink::WebCryptoKeyUsageMask, CryptoResult*);
+
} // namespace WebCore
#endif

Powered by Google App Engine
This is Rietveld 408576698