def encrypt_checked

qasim-bend-kit@0.1.0.2 · libs/AES256GCM.bend:454

import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES256GCM
import Base

454def encrypt_checked(key: SecretKey, nonce: Nonce, aad: List<&2, U32>,
455                    plaintext: List<&2, U32>, aad_ok: Bool, plaintext_ok: Bool) -> Result<&2, &2, Error, Envelope>:
456    match aad_ok plaintext_ok:
457        case True{} True{}: encrypt_valid(key, nonce, aad, plaintext)
458        case _ _: Fail{InvalidBytes{}}

Uses (9)

Used by (15)