Abstract base class for the SHAKE Extendable-Output Functions (XOFs).
More...
#include <SHAKE.h>
|
virtual | ~SHAKE () |
| Destroys this SHAKE object after clearing all sensitive information.
|
|
size_t | blockSize () const |
| Size of the internal block used by the XOF algorithm, in bytes. More...
|
|
void | reset () |
| Resets the XOF ready for a new session. More...
|
|
void | update (const void *data, size_t len) |
| Updates the XOF with more data. More...
|
|
void | extend (uint8_t *data, size_t len) |
| Generates extendable output from this XOF. More...
|
|
void | encrypt (uint8_t *output, const uint8_t *input, size_t len) |
| Encrypts an input buffer with extendable output from this XOF. More...
|
|
void | clear () |
| Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session. More...
|
|
| XOF () |
| Constructs a new XOF object.
|
|
virtual | ~XOF () |
| Destroys this XOF object. More...
|
|
void | decrypt (uint8_t *output, const uint8_t *input, size_t len) |
| Decrypts an input buffer with extendable output from this XOF. More...
|
|
Abstract base class for the SHAKE Extendable-Output Functions (XOFs).
Reference: http://en.wikipedia.org/wiki/SHA-3
- See also
- SHAKE256, SHAKE128, SHA3_256
Definition at line 29 of file SHAKE.h.
◆ SHAKE()
SHAKE::SHAKE |
( |
size_t |
capacity | ) |
|
|
protected |
Constructs a SHAKE object.
- Parameters
-
capacity | The capacity of the Keccak sponge function in bits which should be a multiple of 64 and between 64 and 1536. |
Definition at line 40 of file SHAKE.cpp.
◆ blockSize()
size_t SHAKE::blockSize |
( |
| ) |
const |
|
virtual |
Size of the internal block used by the XOF algorithm, in bytes.
- See also
- update()
Implements XOF.
Definition at line 53 of file SHAKE.cpp.
◆ clear()
Clears the hash state, removing all sensitive data, and then resets the XOF ready for a new session.
- See also
- reset()
Implements XOF.
Definition at line 89 of file SHAKE.cpp.
◆ encrypt()
void SHAKE::encrypt |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
size_t |
len |
|
) |
| |
|
virtual |
Encrypts an input buffer with extendable output from this XOF.
- Parameters
-
output | The output buffer to write to, which may be the same buffer as input. The output buffer must have at least as many bytes as the input buffer. |
input | The input buffer to read from. |
len | The number of bytes to encrypt. |
This function is a convenience that generates data with extend() and then XOR's it with the contents of input to generate the output. This function can also be used to decrypt.
The encrypt() function can be called multiple times with different regions of the plaintext data.
- See also
- reset(), update(), extend(), decrypt()
Implements XOF.
Definition at line 80 of file SHAKE.cpp.
◆ extend()
void SHAKE::extend |
( |
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
virtual |
Generates extendable output from this XOF.
- Parameters
-
data | The data buffer to be filled. |
len | The number of bytes to write to data. |
- See also
- reset(), update(), encrypt()
Implements XOF.
Definition at line 71 of file SHAKE.cpp.
◆ reset()
◆ update()
void SHAKE::update |
( |
const void * |
data, |
|
|
size_t |
len |
|
) |
| |
|
virtual |
The documentation for this class was generated from the following files: