def decrypt_using_aad_validity
import qasim-bend-kit@0.1.0.2/PROOF.bend as PROOFimport Base
import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES
677def decrypt_using_aad_validity(key: AES.SecretKey, +aad: List<&2, U32>,
678 +envelope: AES.Envelope, aad_ok: Bool) ->
679 Result<&2, &2, AES.Error, List<&2, U32>>:
680 AES.decrypt_checked(key, aad, envelope, aad_ok,
681 AES.plaintext_valid(AES.ciphertext(envelope)))