encryptPrivateKey static method

Future<String> encryptPrivateKey(
  1. String privateKey,
  2. String password,
  3. PEMCipher cipher
)

Implementation

static Future<String> encryptPrivateKey(
    String privateKey, String password, PEMCipher cipher) async {
  var requestBuilder = model.EncryptPrivateKeyRequestObjectBuilder(
    privateKey: privateKey,
    password: password,
    cipher: model.Pemcipher.values[cipher.index],
  );

  return RSABridge.call("encryptPrivateKey", requestBuilder.toBytes())
      .then(RSAResponseHandlers.stringResponse);
}