decrypt method

  1. @override
Future<Uint8List> decrypt(
  1. Uint8List encrypted
)
override

Decrypt data using the private key (requires biometric authentication).

Implementation

@override
Future<Uint8List> decrypt(Uint8List encrypted) async {
  try {
    final result = await _methodChannel.invokeMethod<Uint8List>(
      'decrypt',
      {'encrypted': encrypted},
    );
    if (result == null) {
      throw BiometricCryptoException('Decryption returned null');
    }
    return result;
  } on PlatformException catch (e) {
    throw _convertPlatformException(e);
  }
}