decrypt method

Plaintext decrypt(
  1. Ciphertext ciphertext
)

Decrypts the ciphertext message.

Implementation

Plaintext decrypt(Ciphertext ciphertext) {
  Pointer ptr = _c_decrypt(library, ciphertext.obj);
  raiseForStatus();

  /// String cannot be extracted from C object
  if (scheme.name.toLowerCase() == "ckks") {
    return Plaintext.fromPointer(backend, ptr, extractStr: false);
  }
  return Plaintext.fromPointer(backend, ptr);
}