encrypt static method

String encrypt(
  1. String content
)

Implementation

static String encrypt(String content) {
  String pk = "-----BEGIN PUBLIC KEY-----\n" +
      Authing.sPublicKey +
      "\n" +
      "-----END PUBLIC KEY-----";
  RSAPublicKey publicKey = RSAKeyParser().parse(pk) as RSAPublicKey;
  final encrypter = Encrypter(RSA(publicKey: publicKey));
  return encrypter.encrypt(content).base64;
}