encrypt method

  1. @override
String encrypt(
  1. String val,
  2. ZotPublicKey? publicKey
)
override

returns rsa encrypted base64 string

Implementation

@override
String encrypt(String val, ZotPublicKey? publicKey) {
  if (publicKey == null) {
    throw Exception("ZotPublicKey can't be null for RSA encryption");
  }
  return publicKey.encrypt(val);
}