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

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

Issue 194323002: [webcrypto] Change the order of usages in Key.usages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « LayoutTests/crypto/encrypt-decrypt-expected.txt ('k') | no next file » | 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 664410c37c5e1a4f4d44789c69632ce62a5c0859..c3b3fb3045e62bba2bf625053868477e913af338 100644
--- a/Source/modules/crypto/Key.cpp
+++ b/Source/modules/crypto/Key.cpp
@@ -61,15 +61,16 @@ struct KeyUsageMapping {
const char* const name;
};
-// Keep this array sorted.
+// The order of this array is the same order that will appear in Key.usages. It
+// must be kept ordered as described by the Web Crypto spec.
const KeyUsageMapping keyUsageMappings[] = {
- { blink::WebCryptoKeyUsageDecrypt, "decrypt" },
- { blink::WebCryptoKeyUsageDeriveKey, "deriveKey" },
{ blink::WebCryptoKeyUsageEncrypt, "encrypt" },
+ { blink::WebCryptoKeyUsageDecrypt, "decrypt" },
{ blink::WebCryptoKeyUsageSign, "sign" },
- { blink::WebCryptoKeyUsageUnwrapKey, "unwrapKey" },
{ blink::WebCryptoKeyUsageVerify, "verify" },
+ { blink::WebCryptoKeyUsageDeriveKey, "deriveKey" },
{ blink::WebCryptoKeyUsageWrapKey, "wrapKey" },
+ { blink::WebCryptoKeyUsageUnwrapKey, "unwrapKey" },
};
COMPILE_ASSERT(blink::EndOfWebCryptoKeyUsage == (1 << 6) + 1, update_keyUsageMappings);
« no previous file with comments | « LayoutTests/crypto/encrypt-decrypt-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698