5#ifndef BITCOIN_CRYPTO_CHACHA20_H
6#define BITCOIN_CRYPTO_CHACHA20_H
21 ChaCha20(
const uint8_t *key,
size_t keylen);
23 void SetKey(
const uint8_t *key,
size_t keylen);
25 void SetIV(uint64_t iv);
27 void Seek(uint64_t pos);
36 void Crypt(
const uint8_t *
input, uint8_t *output,
size_t bytes);
A class for ChaCha20 256-bit stream cipher developed by Daniel J.
void SetKey(const uint8_t *key, size_t keylen)
set key with flexible keylength; 256bit recommended
void Keystream(uint8_t *c, size_t bytes)
outputs the keystream of size <bytes> into
void Crypt(const uint8_t *input, uint8_t *output, size_t bytes)
enciphers the message <input> of length <bytes> and write the enciphered representation into <output>...