ASCON-HASHA digest algorithm.
More...
#include <hash.h>
|
static void | digest (unsigned char result[ASCON_HASH_SIZE], const unsigned char *data, size_t len) |
| Computes the ASCON-HASHA digest of a block of input data. More...
|
|
ASCON-HASHA digest algorithm.
Definition at line 399 of file hash.h.
◆ hasha() [1/2]
Constructs a new ASCON-HASHA object.
Definition at line 405 of file hash.h.
◆ hasha() [2/2]
Constructs a copy of another ASCON-HASHA object.
- Parameters
-
other | The other ASCON-HASHA digest object. |
Definition at line 415 of file hash.h.
◆ ~hasha()
Destroys this ASCON-HASHA object.
Definition at line 423 of file hash.h.
◆ digest()
static void ascon::hasha::digest |
( |
unsigned char |
result[ASCON_HASH_SIZE], |
|
|
const unsigned char * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinestatic |
Computes the ASCON-HASHA digest of a block of input data.
- Parameters
-
result | Points to the buffer to receive the digest. |
data | Points to the input data to be hashed. |
len | Length of the input data to be hashed. |
Definition at line 521 of file hash.h.
◆ finalize() [1/2]
Finalizes this ASCON-HASHA object and returns the digest as a byte array.
- Returns
- A byte array containing the finalized digest.
Definition at line 507 of file hash.h.
◆ finalize() [2/2]
void ascon::hasha::finalize |
( |
unsigned char |
digest[ASCON_HASHA_SIZE] | ) |
|
|
inline |
Finalizes this ASCON-HASHA object and returns the digest.
The application must call reset() to perform another hashing process.
Definition at line 496 of file hash.h.
◆ operator=()
Copies the state of another ASCON-HASHA object into this one.
- Parameters
-
other | The other object to copy. |
- Returns
- A reference to this ASCON-HASHA object.
Definition at line 435 of file hash.h.
◆ reset()
void ascon::hasha::reset |
( |
| ) |
|
|
inline |
Resets this ASCON-HASHA object back to its initial state.
Definition at line 447 of file hash.h.
◆ state() [1/2]
Gets a reference to the C version of the ASCON-HASHA state.
- Returns
- A reference to the state.
Definition at line 533 of file hash.h.
◆ state() [2/2]
Gets a constant reference to the C version of the ASCON-HASHA state.
- Returns
- A constant reference to the state.
Definition at line 541 of file hash.h.
◆ update() [1/4]
Updates this ASCON-HASHA object with the contents of a byte array.
- Parameters
-
data | Reference to the byte array to absorb. |
Definition at line 486 of file hash.h.
◆ update() [2/4]
void ascon::hasha::update |
( |
const char * |
str | ) |
|
|
inline |
Updates this ASCON-HASHA object with the contents of a NUL-terminated C string.
- Parameters
-
str | Points to the C string to absorb. |
If str is NULL, then this function is equivalent to absorbing the empty string into the state.
Definition at line 472 of file hash.h.
◆ update() [3/4]
void ascon::hasha::update |
( |
const std::string & |
str | ) |
|
|
inline |
Updates this ASCON-HASHA object with the contents of a standard C++ string.
- Parameters
-
str | Reference to the string to absorb. |
Definition at line 551 of file hash.h.
◆ update() [4/4]
void ascon::hasha::update |
( |
const unsigned char * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inline |
Updates this ASCON-HASHA object with new input data.
- Parameters
-
data | Points to the input data to be absorbed into the state. |
len | Length of the input data to be absorbed into the state. |
Definition at line 458 of file hash.h.
The documentation for this class was generated from the following file: