def encrypt_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
651def encrypt_using_aad_validity(key: AES.SecretKey, nonce: AES.Nonce,
652 +aad: List<&2, U32>, +plaintext: List<&2, U32>, aad_ok: Bool) ->
653 Result<&2, &2, AES.Error, AES.Envelope>:
654 AES.encrypt_checked(key, nonce, aad, plaintext, aad_ok,
655 AES.plaintext_valid(plaintext))