I'm doing an app that encrypts and decrypts files. The problem is the returned iv and salt are needed for decryption and in that case I have to store those both iv and salt with the key. Why not let us pass the iv and salt ourselves to the encryption? Those two parameters we can generate and pass them to the encrypt function, we just need to store only the key ourselves.
The same iv and salt that you generate during encryption must be stored for use during decryption, so why not use the same iv and salt generated by the module?
I'm doing an app that encrypts and decrypts files. The problem is the returned iv and salt are needed for decryption and in that case I have to store those both iv and salt with the key. Why not let us pass the iv and salt ourselves to the encryption? Those two parameters we can generate and pass them to the encrypt function, we just need to store only the key ourselves.