<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
var jwkKey = { | |
kty: "oct", | |
k: "jnOw99oOZFLIEPMrgJB55WL46tJSLGt7jnOw99oOZFI" | |
}; | |
Promise.resolve(null).then(function (result) { | |
return crypto.subtle.importKey("jwk", jwkKey, {name: "AES-CBC"}, | |
true, ['encrypt', 'decrypt', | |
'wrapKey', 'unwrapKey']); | |
}).then(function (result) { | |
window.parent.postMessage({success: true}, "*"); | |
}, function (result) { | |
window.parent.postMessage({success: false}, "*"); | |
}); | |
</script> | |
</html> |