Module AEAD.Noalloc
Versions of these functions which write their output in a buffer passed in as an argument
val encrypt : st:t -> iv:bytes -> ad:bytes -> pt:bytes -> ct:bytes -> tag:bytes -> unit Error.result
encrypt st iv ad pt ct tag
takes a statest
, an initial valueiv
, additional dataad
, and plaintextpt
, as well as output buffersct
, which, if successful, will contain the encryptedpt
, andtag
, which will contain the authentication tag for the plaintext and the associated data.
val decrypt : st:t -> iv:bytes -> ad:bytes -> ct:bytes -> tag:bytes -> pt:bytes -> unit Error.result
decrypt st iv ad ct tag pt
takes a statest
, the initial valueiv
, additional dataad
, ciphertextct
, and authentication tagtag
, as well as output bufferpt
, which, if successful, will contain the decryptedct
.