LAWS.aes256gcm_nist_encrypt_observation: def of qasim-bend-kit@0.1.0.2 Import: import qasim-bend-kit@0.1.0.2/LAWS.bend as LAWS Lines 510-522 of qasim-bend-kit@0.1.0.2/LAWS.bend: https://jend.leeeet.dev/read.txt?path=qasim-bend-kit@0.1.0.2/LAWS.bend&start_line=510&end_line=522 import Base import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES # Compare the protocol-visible result while leaving internal certificate terms # out of the NIST contract: success, nonce bytes, ciphertext, and tag bytes. def aes256gcm_nist_encrypt_observation(result: Result<&2, &2, AES.Error, AES.Envelope>) -> List<&2, U32>: match result: case Fail{error}: [] case Done{envelope}: match envelope: case AES.Envelope{nonce, ciphertext, tag, valid}: match nonce tag: case AES.Nonce{nonce_bytes, nonce_size, nonce_valid} AES.Tag{tag_bytes, tag_size, tag_valid}: List.append(&2, U32, nonce_bytes, List.append(&2, U32, ciphertext, tag_bytes)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=Envelope https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=Error https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=Nonce https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=Tag