def envelope_from_gcm
import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES256GCMimport Base
import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as Core
417def envelope_from_gcm(nonce: Nonce, output: Core.GcmOutput) -> Maybe<&2, Envelope>:
418 match output:
419 case Core.GcmOutput{+ciphertext, ciphertext_valid,
420 +tag_bytes, tag_valid, tag_size, tag_words, tag_nonce, tag_aad,
421 tag_matches}:
422 Some{Envelope{nonce, ciphertext,
423 Tag{tag_bytes, tag_size, core_bytes_valid_proof(tag_bytes, tag_valid)},
424 core_bytes_valid_proof(ciphertext, ciphertext_valid)}}
Uses (6)
Used by (0)
No other definition uses this definition.