def envelope_from_gcm_checked

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

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

426def envelope_from_gcm_checked(nonce: Nonce, output: Core.GcmOutput) -> Envelope:
427    match output:
428        case Core.GcmOutput{+ciphertext, ciphertext_valid,
429            +tag_bytes, tag_valid, tag_size, tag_words, tag_nonce, tag_aad,
430            tag_matches}:
431            Envelope{nonce, ciphertext,
432                Tag{tag_bytes, tag_size, core_bytes_valid_proof(tag_bytes, tag_valid)},
433                core_bytes_valid_proof(ciphertext, ciphertext_valid)}

Uses (5)

Used by (8)