![]() |
Bitcoin Core 22.99.0
P2P Digital Currency
|
A class for ChaCha20 256-bit stream cipher developed by Daniel J. More...
#include <chacha20.h>
Public Member Functions | |
| ChaCha20 () | |
| ChaCha20 (const unsigned char *key, size_t keylen) | |
| void | SetKey (const unsigned char *key, size_t keylen) |
| set key with flexible keylength; 256bit recommended */ More... | |
| void | SetIV (uint64_t iv) |
| void | Seek (uint64_t pos) |
| void | Keystream (unsigned char *c, size_t bytes) |
outputs the keystream of size <bytes> into More... | |
| 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> Used for encryption and decryption (XOR) More... | |
Private Attributes | |
| uint32_t | input [16] |
A class for ChaCha20 256-bit stream cipher developed by Daniel J.
Bernstein https://cr.yp.to/chacha/chacha-20080128.pdf
Definition at line 13 of file chacha20.h.
| ChaCha20::ChaCha20 | ( | ) |
Definition at line 52 of file chacha20.cpp.
| ChaCha20::ChaCha20 | ( | const unsigned char * | key, |
| size_t | keylen | ||
| ) |
| void ChaCha20::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> Used for encryption and decryption (XOR)
Definition at line 182 of file chacha20.cpp.
| void ChaCha20::Keystream | ( | unsigned char * | c, |
| size_t | bytes | ||
| ) |
outputs the keystream of size <bytes> into
Definition at line 74 of file chacha20.cpp.
| void ChaCha20::Seek | ( | uint64_t | pos | ) |
| void ChaCha20::SetIV | ( | uint64_t | iv | ) |
| void ChaCha20::SetKey | ( | const unsigned char * | key, |
| size_t | keylen | ||
| ) |
set key with flexible keylength; 256bit recommended */
Definition at line 24 of file chacha20.cpp.
|
private |
Definition at line 16 of file chacha20.h.