Module NaCl.Noalloc
Versions of these functions which write their output in a buffer passed in as an argument
Buffers have the following size requirements:
ctmust be 16 bytes longer thanptto also include the message authentication tagpk,sk,ck: 32 bytesn: 24 bytes
val box_beforenm : pk:bytes -> sk:bytes -> ck:bytes -> boolbox_beforenm pk sk ckis a version ofNaCl.box_beforenmwhich takes an additional argumentckwhere the result is written, returning `true` if it is successful.Buffers
pk,sk, andckmust be distinct.
module Easy : sig ... endThe easy interface concatenates the ciphertext and the 16-byte long message authentication tag into a single buffer.
module Detached : sig ... endThe detached interface uses 2 separate buffers for the ciphertext and the message authentication tag. This allows users to encrypt and decrypt data in-place, by passing the same buffer for both plaintext and ciphertext.