decrypt method

BuBytes? decrypt(
  1. List<int> senderPublicKey,
  2. List<int> payload
)

Decrypts a NONCE || TAG || CIPHERTEXT bridge payload from senderPublicKey. Returns the plaintext, or null when truncated or unauthenticated (never throws on attacker input).

Routed through QuickCrypto and therefore the active backend (see encrypt).

Implementation

BuBytes? decrypt(List<int> senderPublicKey, List<int> payload) {
  return QuickCrypto.salsaBoxOpen(
    peerPublicKey: senderPublicKey,
    secretKey: _keypair.privateKey,
    sealed: payload,
  );
}