rsaDecrypt function

String rsaDecrypt({
  1. required String encryptedData,
  2. required String privateKeyPem,
})

Decrypt text using RSA private key

Arguments

  • encrypted_data - Base64 encoded encrypted data
  • private_key_pem - The RSA private key in PEM format

Returns

  • Result<String, CryptoError> - Decrypted plaintext or error

Implementation

String rsaDecrypt({required String encryptedData, required String privateKeyPem}) =>
    RustLib.instance.api.crateRsaDecrypt(encryptedData: encryptedData, privateKeyPem: privateKeyPem);