MattSurabian / aes-gcm-stream

A NodeJS Module that implements AES256 GCM encryption and decryption using streams
MIT License
11 stars 1 forks source link

Add decrypt example using web crypto api in browser #13

Open bluthen opened 6 years ago

bluthen commented 6 years ago

I think it could be handy if there was an example of how to decrypt a string made with aes-gcm-stream with a browser's web crypto API. Can save people time in the future, on how to get the nonce out and make a key and everything.

I have created an example if you want to include it: https://gist.github.com/bluthen/c0fa4d95a77089e61000ee4a36e854e7

node_aes_gcm_stream_base64.js Generated the base64 strings that is used in web_crypto_decrypt_node_aes_gcm_stream.js

No hard feeling if you don't want it in there.

MattSurabian commented 6 years ago

Thanks! I think it's a great idea to have examples like this.