newSecretKey method

  1. @nonVirtual
  2. @override
Future<SecretKey> newSecretKey()
override

Generates a new SecretKey.

It will have the correct length (secretKeyLength).

The source of random bytes is Random.secure (a cryptographically secure random number generator) unless a custom random number generator was specified when you constructed the cipher (or your Cryptography instance).

Implementation

@nonVirtual
@override
Future<SecretKey> newSecretKey() async {
  return newSecretKeySync();
}