chacha20-encrypt-string ( string key-bytes nonce-bytes counter -- ciphertext )
ChaCha20 stream cipher

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


Vocabulary
crypto.chacha20

Inputs
stringa string
key-bytes32-byte array
nonce-bytes12-byte array
counterstarting block counter


Outputs
ciphertexta byte-array


Word description
Encrypts a string using ChaCha20, returning ciphertext bytes.

Examples
USING: byte-arrays crypto.chacha20 ; "Hello" 32 <byte-array> 12 <byte-array> 1 chacha20-encrypt-string
! => B{ 215 98 139 210 58 }


Definition