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); |