If you're on Lazysodium version 2 and you want to upgrade to version 3, then there are a few things that have been added which you need to note.
All cryptoSecretBoxKeygen
functions now return a Key
. A Key
holds a bunch of bytes that represent maybe a master key, or a subkey, or any type of key. The reason why Lazysodium chose to use this was mainly because users of the library were getting confused as to what to put into functions like:
secretBoxLazy.cryptoSecretBoxEasy(String message, byte[] nonce, String key);