generateKey static method
Generates a fresh fernet key. Keep this some place safe! If you lose it you'll no longer be able to decrypt messages; if anyone else gains access to it, they'll be able to decrypt all of your messages, and they'll also be able forge arbitrary messages that will be authenticated and decrypted.
Implementation
static String generateKey() =>
base64Url.encode(CryptoUtils.secureRandomBytes(32));