def decrypt_authenticated_tag

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

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

484def decrypt_authenticated_tag(+words: List<&2, U32>,
485    +nonce: List<&2, U32>, +aad: List<&2, U32>,
486    +ciphertext: List<&2, U32>, +envelope: Envelope, tag: Tag) ->
487    Result<&2, &2, Error, List<&2, U32>>:
488    match tag:
489        case Tag{tag_bytes, size, valid}:
490            authenticated = bytes_equal_full_scan(tag_bytes,
491                Core.gcm_tag_bytes(Core.gcm_tag_output(words, nonce, aad,
492                    ciphertext)))
493            decrypt_auth_result(words, envelope, authenticated)

Uses (10)

Used by (4)