According to the docs the crypto_secretbox_keygen is equivalent to calling randombytes_buf() but improves code clarity and can prevent misuse by ensuring that the provided key length is always be correct.
Same thing for crypto_auth_keygen.
Also fix secretbox functions using box constants.
And add typescript declaration files, with proper types.
According to the docs the
crypto_secretbox_keygen
is equivalent to callingrandombytes_buf()
but improves code clarity and can prevent misuse by ensuring that the provided key length is always be correct. Same thing forcrypto_auth_keygen
.Also fix
secretbox
functions usingbox
constants.And add typescript declaration files, with proper types.
Tested on Android, but can't test on iOS.