php-internal-docs 8.4.8
Unofficial docs for php/php-src
|
Go to the source code of this file.
Data Structures | |
struct | Keccak_HashInstance |
Macros | |
#define | Keccak_HashInitialize_SHAKE128(hashInstance) |
#define | Keccak_HashInitialize_SHAKE256(hashInstance) |
#define | Keccak_HashInitialize_SHA3_224(hashInstance) |
#define | Keccak_HashInitialize_SHA3_256(hashInstance) |
#define | Keccak_HashInitialize_SHA3_384(hashInstance) |
#define | Keccak_HashInitialize_SHA3_512(hashInstance) |
#define | Keccak_HashInstance_ImplType 32 |
Typedefs | |
typedef unsigned char | BitSequence |
typedef size_t | DataLength |
Enumerations | |
enum | HashReturn { SUCCESS = 0 , FAIL = 1 , BAD_HASHLEN = 2 } |
Functions | |
HashReturn | Keccak_HashInitialize (Keccak_HashInstance *hashInstance, unsigned int rate, unsigned int capacity, unsigned int hashbitlen, unsigned char delimitedSuffix) |
HashReturn | Keccak_HashUpdate (Keccak_HashInstance *hashInstance, const BitSequence *data, DataLength databitlen) |
HashReturn | Keccak_HashFinal (Keccak_HashInstance *hashInstance, BitSequence *hashval) |
HashReturn | Keccak_HashSqueeze (Keccak_HashInstance *hashInstance, BitSequence *data, DataLength databitlen) |
#define Keccak_HashInitialize_SHA3_224 | ( | hashInstance | ) |
Macro to initialize a SHA3-224 instance as specified in the FIPS 202 standard.
Definition at line 61 of file KeccakHash.h.
#define Keccak_HashInitialize_SHA3_256 | ( | hashInstance | ) |
Macro to initialize a SHA3-256 instance as specified in the FIPS 202 standard.
Definition at line 65 of file KeccakHash.h.
#define Keccak_HashInitialize_SHA3_384 | ( | hashInstance | ) |
Macro to initialize a SHA3-384 instance as specified in the FIPS 202 standard.
Definition at line 69 of file KeccakHash.h.
#define Keccak_HashInitialize_SHA3_512 | ( | hashInstance | ) |
Macro to initialize a SHA3-512 instance as specified in the FIPS 202 standard.
Definition at line 73 of file KeccakHash.h.
#define Keccak_HashInitialize_SHAKE128 | ( | hashInstance | ) |
Macro to initialize a SHAKE128 instance as specified in the FIPS 202 standard.
Definition at line 53 of file KeccakHash.h.
#define Keccak_HashInitialize_SHAKE256 | ( | hashInstance | ) |
Macro to initialize a SHAKE256 instance as specified in the FIPS 202 standard.
Definition at line 57 of file KeccakHash.h.
#define Keccak_HashInstance_ImplType 32 |
Definition at line 111 of file KeccakHash.h.
typedef unsigned char BitSequence |
Definition at line 24 of file KeccakHash.h.
typedef size_t DataLength |
Definition at line 25 of file KeccakHash.h.
enum HashReturn |
Enumerator | |
---|---|
SUCCESS | |
FAIL | |
BAD_HASHLEN |
Definition at line 26 of file KeccakHash.h.
HashReturn Keccak_HashFinal | ( | Keccak_HashInstance * | hashInstance, |
BitSequence * | hashval ) |
Function to call after all input blocks have been input and to get output bits if the length was specified when calling Keccak_HashInitialize().
hashInstance | Pointer to the hash instance initialized by Keccak_HashInitialize(). If hashbitlen was not 0 in the call to Keccak_HashInitialize(), the number of output bits is equal to hashbitlen. If hashbitlen was 0 in the call to Keccak_HashInitialize(), the output bits must be extracted using the Keccak_HashSqueeze() function. |
hashval | Pointer to the buffer where to store the output data. |
Definition at line 64 of file KeccakHash.c.
HashReturn Keccak_HashInitialize | ( | Keccak_HashInstance * | hashInstance, |
unsigned int | rate, | ||
unsigned int | capacity, | ||
unsigned int | hashbitlen, | ||
unsigned char | delimitedSuffix ) |
Function to initialize the Keccak[r, c] sponge function instance used in sequential hashing mode.
hashInstance | Pointer to the hash instance to be initialized. |
rate | The value of the rate r. |
capacity | The value of the capacity c. |
hashbitlen | The desired number of output bits, or 0 for an arbitrarily-long output. |
delimitedSuffix | Bits that will be automatically appended to the end of the input message, as in domain separation. This is a byte containing from 0 to 7 bits formatted like the delimitedData parameter of the Keccak_SpongeAbsorbLastFewBits() function. |
Definition at line 21 of file KeccakHash.c.
HashReturn Keccak_HashSqueeze | ( | Keccak_HashInstance * | hashInstance, |
BitSequence * | data, | ||
DataLength | databitlen ) |
Function to squeeze output data.
hashInstance | Pointer to the hash instance initialized by Keccak_HashInitialize(). |
data | Pointer to the buffer where to store the output data. |
databitlen | The number of output bits desired (must be a multiple of 8). |
Definition at line 75 of file KeccakHash.c.
HashReturn Keccak_HashUpdate | ( | Keccak_HashInstance * | hashInstance, |
const BitSequence * | data, | ||
DataLength | databitlen ) |
Function to give input data to be absorbed.
hashInstance | Pointer to the hash instance initialized by Keccak_HashInitialize(). |
data | Pointer to the input data. When databitLen is not a multiple of 8, the last bits of data must be in the least significant bits of the last byte (little-endian convention). |
databitLen | The number of input bits provided in the input data. |
Definition at line 37 of file KeccakHash.c.