jedisct1 / libsodium.js

libsodium compiled to Webassembly and pure JavaScript, with convenient wrappers.
Other
968 stars 138 forks source link

In need a help #321

Closed SwykanySolutions closed 1 year ago

SwykanySolutions commented 1 year ago

I need help, I'm using the libsodium-warpper library, but following the instructions inside the npm page, the concat method doesn't work anymore. I don't know if it's the java script or if there's a library missing.

ERROR:
    return nonce.concat(sodium.crypto_secretbox_easy(message, nonce, key));
                 ^
TypeError: nonce.concat is not a function
at encrypt_and_prepend_nonce 
jedisct1 commented 1 year ago

Did you try checking what type nonce is?