You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
true, // can the key be extracted using SubtleCrypto.exportKey() / SubtleCrypto.wrapKey()?
42
+
['decrypt'] // keyUsages
43
+
).then(function(key) {
44
+
window.crypto.subtle.decrypt(
45
+
{
46
+
name:"AES-CBC",
47
+
iv: iv
48
+
},
49
+
key,
50
+
ciphertext
51
+
).then(function(plaintext) {
52
+
console.log(newTextDecoder().decode(plaintext));
53
+
})
54
+
});
55
+
```
56
+
Note that although the specifications [do provide for AES-192-CBC](https://www.w3.org/TR/WebCryptoAPI/#aes-cbc-operations), Google Chrome [only supports AES-128-CBC and AES-256-CBC](https://sites.google.com/a/chromium.org/dev/blink/webcrypto#TOC-AES-support).
57
+
58
+
See it in action at https://jsfiddle.net/ewaysj3b/
0 commit comments