decryptString static method

String decryptString(
  1. String encryptStr,
  2. String private
)

私钥解密

Implementation

static String decryptString(String encryptStr, String private) {
  final RSAPrivateKey privateKey =
      RSAKeyParser().parse(private) as RSAPrivateKey;
  final Encrypter decrypter = Encrypter(RSA(privateKey: privateKey));
  final String decrypted = decrypter.decrypt64(encryptStr);
  return decrypted;
}