-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
enhancementNew feature or requestNew feature or request
Description
- Compare
jwk.alg(if presents) withalgorithmargument and throwDOMExceptionif they are not equal
Example
var key = await crypto.subtle.generateKey({name: "AES-CBC", length: 256}, true, ["encrypt", "decrypt"]);
var jwk = await crypto.subtle.exportKey("jwk", key);
delete jwk.key_ops
var hmacKey = await crypto.subtle.importKey("jwk", jwk, {name: "AES-KW"}, false, ["wrapKey"]);DOMException (Chrome)
DOMException: The JWK "alg" member was inconsistent with that specified by the Web Crypto call
- Compare
jwk.key_ops(if presents) withkeyUsagesargument and throwDOMExceptionif they are not equal
Example
var key = await crypto.subtle.generateKey({name: "AES-CBC", length: 256}, true, ["encrypt", "decrypt"]);
var jwk = await crypto.subtle.exportKey("jwk", key);
var hmacKey = await crypto.subtle.importKey("jwk", jwk, {name: "AES-KW"}, false, ["wrapKey"]);DOMException (Chrome)
DOMException: The JWK "key_ops" member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request