chacha20-crypt-bytes ( data key-bytes nonce-bytes counter -- result )
ChaCha20 stream cipher

Prev:chacha20-crypt ( data key nonce counter -- result )
Next:chacha20-encrypt-string ( string key-bytes nonce-bytes counter -- ciphertext )


Vocabulary
crypto.chacha20

Inputs
dataa byte-array
key-bytes32-byte array
nonce-bytes12-byte array
counterstarting block counter


Outputs
resulta byte-array


Word description
Encrypts or decrypts data using ChaCha20 with raw byte keys and nonces. Converts bytes to u32 arrays internally.

Examples
USING: byte-arrays crypto.chacha20 ; "Hello" >byte-array 32 <byte-array> 12 <byte-array> 1 chacha20-crypt-bytes 32 <byte-array> 12 <byte-array> 1 chacha20-crypt-bytes >string
! => "Hello"


Definition