Function strong_box::generate_key

source ·
pub fn generate_key() -> [u8; 32]
Expand description

Create a key suitable for use by StrongBox.

This isn’t usually required in real-world usage, as you’ll usually have your keys stored somewhere out of the way. However, for testing use, or the odd occasion when encryption/decryption is very temporary, a simple function to generate a secure key is useful to have laying around.