def open_tag

bend-collections@1.0.0.0 · src/crypto/aead/chacha20poly1305.bend:50

import bend-collections@1.0.0.0/src/crypto/aead/chacha20poly1305.bend as Chacha20poly1305
import Base
import bend-collections@1.0.0.0/src/crypto/chacha/chacha20.bend as CH

50def open_tag(ok: Bool, +key: List<&2, U32>, +nonce: List<&2, U32>, +ct: List<&2, U32>) -> Maybe<&2, List<&2, U32>>:
51  match ok:
52    case True{}: Some{CH.encrypt_rounds(10n, key, 1, nonce, ct)}
53    case False{}: None{}

Uses (5)

Used by (1)