AESEnvelopeProof.aes_parse_decoded_if_some: def of qasim-bend-kit@0.1.0.2 Import: import qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend as AESEnvelopeProof Lines 795-871 of qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend: https://jend.leeeet.dev/read.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&start_line=795&end_line=871 import Base import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES def aes_parse_decoded_if_some(+nonce: List<&2, U32>, +tag: List<&2, U32>, +ciphertext: List<&2, U32>, ns: Maybe<&0, {List.length(&2, U32, aes_hex_mask_bytes(nonce)) == 12n : Nat}>, ts: Maybe<&0, {List.length(&2, U32, aes_hex_mask_bytes(tag)) == 16n : Nat}>, nv: Maybe<&0, {AES.bytes_valid(aes_hex_mask_bytes(nonce)) == True{} : Bool}>, tv: Maybe<&0, {AES.bytes_valid(aes_hex_mask_bytes(tag)) == True{} : Bool}>, cv: Maybe<&0, {AES.bytes_valid(aes_hex_mask_bytes(ciphertext)) == True{} : Bool}>, ns_present: {Maybe.is_some(&0, {List.length(&2, U32, aes_hex_mask_bytes(nonce)) == 12n : Nat}, ns) == True{} : Bool}, ts_present: {Maybe.is_some(&0, {List.length(&2, U32, aes_hex_mask_bytes(tag)) == 16n : Nat}, ts) == True{} : Bool}, nv_present: {Maybe.is_some(&0, {AES.bytes_valid(aes_hex_mask_bytes(nonce)) == True{} : Bool}, nv) == True{} : Bool}, tv_present: {Maybe.is_some(&0, {AES.bytes_valid(aes_hex_mask_bytes(tag)) == True{} : Bool}, tv) == True{} : Bool}, cv_present: {Maybe.is_some(&0, {AES.bytes_valid(aes_hex_mask_bytes(ciphertext)) == True{} : Bool}, cv) == True{} : Bool}) -> {Result.map(&2, &2, AES.Error, AES.Envelope, String, AES.encode, AES.parse_decoded(aes_hex_mask_bytes(nonce), aes_hex_mask_bytes(tag), aes_hex_mask_bytes(ciphertext), ns, ts, nv, tv, cv)) == Done{"v1." ++ AES.hex_bytes(nonce) ++ "." ++ AES.hex_bytes(tag) ++ "." ++ AES.hex_bytes(ciphertext)} : Result<&2, &2, AES.Error, String>}: match ns: case None{}: Empty.absurd(aes_parse_decoded_map_goal(nonce, tag, ciphertext, None{}, ts, nv, tv, cv), aes_false_true(ns_present)) case Some{ns_proof}: match ts: case None{}: Empty.absurd(aes_parse_decoded_map_goal(nonce, tag, ciphertext, Some{ns_proof}, None{}, nv, tv, cv), aes_false_true(ts_present)) case Some{ts_proof}: match nv: case None{}: Empty.absurd(aes_parse_decoded_map_goal(nonce, tag, ciphertext, Some{ns_proof}, Some{ts_proof}, None{}, tv, cv), aes_false_true(nv_present)) case Some{nv_proof}: match tv: case None{}: Empty.absurd(aes_parse_decoded_map_goal( nonce, tag, ciphertext, Some{ns_proof}, Some{ts_proof}, Some{nv_proof}, None{}, cv), aes_false_true(tv_present)) case Some{tv_proof}: match cv: case None{}: Empty.absurd( aes_parse_decoded_map_goal( nonce, tag, ciphertext, Some{ns_proof}, Some{ts_proof}, Some{nv_proof}, Some{tv_proof}, None{}), aes_false_true(cv_present)) case Some{cv_proof}: aes_parse_decoded_masked_map( nonce, tag, ciphertext, ns_proof, ts_proof, nv_proof, tv_proof, cv_proof) Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe.is_some https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append 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=bytes_valid https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=encode https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=hex_bytes https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=parse_decoded https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&name=aes_false_true https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&name=aes_hex_mask_bytes https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&name=aes_parse_decoded_map_goal https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&name=aes_parse_decoded_masked_map