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

Prev:chacha20-encrypt-string ( string key-bytes nonce-bytes counter -- ciphertext )


Vocabulary
crypto.chacha20

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


Outputs
stringa string


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

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


Definition


: chacha20-decrypt-string
( ciphertext key-bytes nonce-bytes counter -- string )
chacha20-crypt-bytes >string ;