newSecretKeyFromBytes method
Constructs a new SecretKey from the bytes.
Throws ArgumentError if the argument length is not secretKeyLength.
Implementation
@override
Future<SecretKey> newSecretKeyFromBytes(List<int> bytes) {
if (bytes.length != secretKeyLength) {
throw ArgumentError('Invalid secret key length');
}
return Future<_DartAesSecretKeyData>.value(_DartAesSecretKeyData(bytes));
}