generateDerivedParametersWithIV method
Generates a derived key with the given keySize
in bytes and a derived IV with the given ivSize
.
Implementation
@override
ParametersWithIV generateDerivedParametersWithIV(int keySize, int ivSize) {
keySize = keySize;
ivSize = ivSize;
if ((keySize + ivSize) > digest.digestSize) {
throw ArgumentError(
"Can't generate a derived key ${keySize + ivSize} bytes long.");
}
var dKey = generateDerivedKey();
return ParametersWithIV(KeyParameter(dKey), dKey);
}