I really need assistance on this.
Based on this documentation:
https://msdn.microsoft.com/en-us/library/dn302335(v=vs.85).aspx
On MS Edge following unwrapping code works:
window.crypto.subtle.unwrapKey("raw",
wrappedKey,
derivedKey,{"name":"AES-KW", iv: iv },{"name":"AES-CBC", iv: iv },false,["decrypt"])
Following does not throws an error but the resulting key is null:
var wrappedKey = base64DecodeToArray("FWPt4AZDKJaN1KssHCBo+ZFSX/rKvh3eLMpOfHILsVYbV7WWSwX8NQ==");
window.msCrypto.subtle.unwrapKey(
wrappedKey,{"name":"AES-KW",
iv: iv,
hash:{ name:"SHA-256"}},
e.target.result,false,["decrypt"])
What am I doing wrong? I could not find any code examples.