init method
Initialize the encryptor.
Implementation
@override
void init(CipherParameters params) {
AsymmetricKeyParameter akparams;
if (params is ParametersWithRandom) {
akparams = params.parameters as AsymmetricKeyParameter<AsymmetricKey>;
_random = params.random;
} else {
akparams = params as AsymmetricKeyParameter<AsymmetricKey>;
_random = _newSecureRandom();
}
var k = akparams.key as ECAsymmetricKey;
if (k is! ECPublicKey) {
throw ArgumentError('ECPublicKey is required for encryption.');
}
_key = k;
}