genAsymmKeysWithKeySizeType method
Generates a pair of keys for the purpose of asymmetric encryption of the specified size.
param keySizeType size of the keys. Must be one of CryptAsymmKeys.KEY_SIZE_TYPE constants. return CryptAsymmKeysPair object containing asymmetric keys data, both public and private.
Implementation
CryptAsymmKeysPair genAsymmKeysWithKeySizeType(
ASYMM_KEY_SIZE_TYPE keySizeType) {
try {
return new CryptAsymmKeys().generateKeys();
} on Exception catch (e) {
exception = e;
error = true;
}
CryptAsymmKeys cryptAsymmKeys = new CryptAsymmKeys();
return cryptAsymmKeys.generateKeys();
}