Module 1-Crypto.IETF_ChaCha20

val crypt : key:string -> nonce:string -> ?⁠ctr:int -> string -> string

crypt ~key ~nonce ~ctr data returns the XOR of the IETF ChaCha20 applied to data using key key (32-byte) nonce nonce (12-byte). Counter ctr (defaults to 0) may be used to specify position in ChaCha20 stream.