denolib / awesome-deno

Curated list of awesome things related to Deno

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: crypto.subtle.importKey is not a function

hiral-kotadiya opened this issue · comments

After updating, Deno v1.11.0 I am getting typeError in encryption.

const aes = new AES(this.key, { mode: "cbc", iv: this.salt }); // This works proper
const cipher = await aes.encrypt(str); // Error genrates from here.

Error is:
TypeError: crypto.subtle.importKey is not a function at WebCryptoAES.loadKey (https://deno.land/x/god_crypto@v1.4.9/src/aes/aes_wc.ts:24:39) at WebCryptoAES.encrypt (https://deno.land/x/god_crypto@v1.4.9/src/aes/aes_wc.ts:37:28) at AES.encrypt (https://deno.land/x/god_crypto@v1.4.9/src/aes/mod.ts:40:43)

That seems an issue of god_crypto, and you've already opened an issue in right repository invisal/god_crypto#36