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