open static method

Uint8List open({
  1. required Key recipientKey,
  2. required Key senderKey,
  3. required Uint8List message,
  4. required Uint8List nonce,
})

Decrypts a message from a crypto box.

Implementation

static Uint8List open({
  required Key recipientKey,
  required Key senderKey,
  required Uint8List message,
  required Uint8List nonce,
}) {
  try {
    return askarKeyCryptoBoxOpen(
      recipientKey.handle,
      senderKey.handle,
      message,
      nonce,
    ).getValueOrException();
  } catch (e) {
    throw AskarKeyException('Error on crypto box open: $e');
  }
}