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

Unified Diff: Source/modules/crypto/Key.cpp

Issue 248963006: [webcrypto] Add key usage for 'deriveBits' (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
« no previous file with comments | « Source/bindings/v8/SerializedScriptValue.cpp ('k') | Source/modules/crypto/NormalizeAlgorithm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/Key.cpp
diff --git a/Source/modules/crypto/Key.cpp b/Source/modules/crypto/Key.cpp
index c3b3fb3045e62bba2bf625053868477e913af338..09b4fd4a6012ad97503f786179ea7cbb33f08b79 100644
--- a/Source/modules/crypto/Key.cpp
+++ b/Source/modules/crypto/Key.cpp
@@ -69,11 +69,12 @@ const KeyUsageMapping keyUsageMappings[] = {
{ blink::WebCryptoKeyUsageSign, "sign" },
{ blink::WebCryptoKeyUsageVerify, "verify" },
{ blink::WebCryptoKeyUsageDeriveKey, "deriveKey" },
+ { blink::WebCryptoKeyUsageDeriveBits, "deriveBits" },
{ blink::WebCryptoKeyUsageWrapKey, "wrapKey" },
{ blink::WebCryptoKeyUsageUnwrapKey, "unwrapKey" },
};
-COMPILE_ASSERT(blink::EndOfWebCryptoKeyUsage == (1 << 6) + 1, update_keyUsageMappings);
+COMPILE_ASSERT(blink::EndOfWebCryptoKeyUsage == (1 << 7) + 1, update_keyUsageMappings);
const char* keyUsageToString(blink::WebCryptoKeyUsage usage)
{
@@ -107,6 +108,8 @@ blink::WebCryptoKeyUsageMask toKeyUsage(AlgorithmOperation operation)
return blink::WebCryptoKeyUsageVerify;
case DeriveKey:
return blink::WebCryptoKeyUsageDeriveKey;
+ case DeriveBits:
+ return blink::WebCryptoKeyUsageDeriveBits;
case WrapKey:
return blink::WebCryptoKeyUsageWrapKey;
case UnwrapKey:
« no previous file with comments | « Source/bindings/v8/SerializedScriptValue.cpp ('k') | Source/modules/crypto/NormalizeAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698