8 Replies
Any idea’s 😅
It looks like its a bug/unfinished feature in Deno's node:crypto implementation. If you change your code to use 'aes-128-cbc' and the key to randomBytes(16) it will run.
Can you use Deno's native crypto.subtle encryption/decryption?
If I figure out how to translate it then yea
crypto.subtle isn't quite as user friendly since you have to handle all the Buffer conversions yourself. Here's an example of your original code rewritten with crypto.subtle.
@shansbiggestfan could you open a bug report in the repo? It appears to be actual bug that we need to fix on our side
Here's another example of native deno aes encryption/decryption (from an old just-for-fun-project of mine) https://github.com/Hexagon/lock/blob/master/src/encryption.ts
GitHub
lock/src/encryption.ts at master · Hexagon/lock
Single binary cli application to encrypt or decrypt files - Hexagon/lock
what repo would this be in
deno_std or deno
Deno repo