EncryptionOptions.withRandomKey constructor
EncryptionOptions.withRandomKey({
- EncryptionAlgorithm algorithm = EncryptionAlgorithm.aes256,
Creates a new instance of EncryptionOptions with a randomly generated key.
Implementation
factory EncryptionOptions.withRandomKey({
EncryptionAlgorithm algorithm = EncryptionAlgorithm.aes256,
}) {
return EncryptionOptions(
algorithm: algorithm,
key: Encryption.generateSecureKey(),
);
}