def decrypt_authenticated

qasim-bend-kit@0.1.0.2 · libs/AES256GCM.bend:495

import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES256GCM
import Base
import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as Core

495def decrypt_authenticated(key: SecretKey, +aad: List<&2, U32>, +envelope: Envelope) -> Result<&2, &2, Error, List<&2, U32>>:
496    match key envelope:
497        case SecretKey{+key_bytes, _, _} Envelope{nonce, ciphertext, +tag, _}:
498            +words = Core.aes256_expand(key_bytes)
499            decrypt_authenticated_tag(words, raw_nonce_bytes(nonce), aad,
500                ciphertext, envelope, tag)

Uses (9)

Used by (5)