Absolutely. For the sake of keeping the code example simple I opted to just hardcode the nonce, but you're right the nonce is critical for the encryption/decryption and should never be hardcoded. I updated the code example to randomly generate it.
Some libraries don't even give you the ability to pass a nonce when encrypting, they're generated internally.
Thanks for taking the time to write your feedback! Appreciated.
For further actions, you may consider blocking this person and/or reporting abuse
Where hackers, sticks, weekend warriors, pros, architects and wannabes come together
Absolutely. For the sake of keeping the code example simple I opted to just hardcode the nonce, but you're right the nonce is critical for the encryption/decryption and should never be hardcoded. I updated the code example to randomly generate it.
Some libraries don't even give you the ability to pass a nonce when encrypting, they're generated internally.
Thanks for taking the time to write your feedback! Appreciated.