Module Chacha20_Poly1305.Noalloc
Versions of these functions which write their output in a buffer passed in as an argument
val encrypt : key:bytes -> iv:bytes -> ad:bytes -> pt:bytes -> ct:bytes -> tag:bytes -> unit
encrypt key iv ad pt ct tag
takes akey
, an initial valueiv
, additional dataad
, and plaintextpt
, as well as output buffersct
, which will contain the encryptedpt
, andtag
, which will contain the authentication tag for the plaintext and the associated data.