def decrypt_payload
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
474def decrypt_payload(words: List<&2, U32>, envelope: Envelope) -> Result<&2, &2, Error, List<&2, U32>>:
475 match envelope:
476 case Envelope{nonce, ciphertext, tag, valid}:
477 Done{Core.gcm_decrypt_expanded(words, raw_nonce_bytes(nonce), ciphertext)}