decrypt method
Future<DecryptResult>
decrypt(
- String payload,
- String? keyAlias,
- PayloadFormat payloadFormat,
- DecryptConfig? config,
- String? promptMessage,
Decrypts data.
Note: Not supported on Windows.
payload is the encrypted data.
keyAlias specifies which key to decrypt with. Defaults to the default alias.
payloadFormat specifies the format of the encrypted data.
config contains platform-specific options. See DecryptConfig.
promptMessage is the message shown to the user during authentication.
Implementation
Future<DecryptResult> decrypt(
String payload,
String? keyAlias,
PayloadFormat payloadFormat,
DecryptConfig? config,
String? promptMessage,
) async {
final pigeonVar_channelName =
'dev.flutter.pigeon.biometric_signature.BiometricSignatureApi.decrypt$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[payload, keyAlias, payloadFormat, config, 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 DecryptResult?)!;
}
}