createKeys method
Future<KeyCreationResult>
createKeys(
- String? keyAlias,
- CreateKeysConfig? config,
- KeyFormat keyFormat,
- String? promptMessage,
Creates a new key pair.
keyAlias is an optional alias for the key. When null, the default
alias is used. Different aliases create independent key pairs.
config contains platform-specific options. See CreateKeysConfig.
keyFormat specifies the output format for the public key.
promptMessage is the message shown to the user during authentication.
Implementation
Future<KeyCreationResult> createKeys(
String? keyAlias,
CreateKeysConfig? config,
KeyFormat keyFormat,
String? promptMessage,
) async {
final pigeonVar_channelName =
'dev.flutter.pigeon.biometric_signature.BiometricSignatureApi.createKeys$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[keyAlias, config, keyFormat, promptMessage],
);
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
if (pigeonVar_replyList == null) {
throw _createConnectionError(pigeonVar_channelName);
} else if (pigeonVar_replyList.length > 1) {
throw PlatformException(
code: pigeonVar_replyList[0]! as String,
message: pigeonVar_replyList[1] as String?,
details: pigeonVar_replyList[2],
);
} else if (pigeonVar_replyList[0] == null) {
throw PlatformException(
code: 'null-error',
message: 'Host platform returned null value for non-null return value.',
);
} else {
return (pigeonVar_replyList[0] as KeyCreationResult?)!;
}
}