KECCAK_ROUNDS
KECCAK_ROUNDS
Internal algorithm rounds count.
Class NativeSha3 - Pure PHP implementation of the SHA-3 algorithm.
digest224(string|mixed $inputData, boolean|integer|null $rawOutput = false) : string
The SHA-3-224 hashing function.
string|mixed | $inputData | The input message to be hashed. |
boolean|integer|null | $rawOutput | When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. |
Validation errors.
The output digest.
digest256(string|mixed $inputData, boolean|integer|null $rawOutput = false) : string
The SHA-3-256 hashing function.
string|mixed | $inputData | The input message to be hashed. |
boolean|integer|null | $rawOutput | When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. |
Validation errors.
The output digest.
digest384(string|mixed $inputData, boolean|integer|null $rawOutput = false) : string
The SHA-3-384 hashing function.
string|mixed | $inputData | The input message to be hashed. |
boolean|integer|null | $rawOutput | When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. |
Validation errors.
The output digest.
digest512(string|mixed $inputData, boolean|integer|null $rawOutput = false) : string
The SHA-3-512 hashing function.
string|mixed | $inputData | The input message to be hashed. |
boolean|integer|null | $rawOutput | When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits. |
Validation errors.
The output digest.
keccakAlgorithm(string|mixed $inputBytes, integer $outputLength, integer $algorithmSuffix, boolean|integer|null $rawOutput) : string
The internal Keccak native implementation.
string|mixed | $inputBytes | The data for hashing. |
integer | $outputLength | The output length for the algorithm. |
integer | $algorithmSuffix | The used integer suffix for the algorithm. |
boolean|integer|null | $rawOutput | Flag for using raw byte output instead of HEX. |
The output digest.
binarySafeSubStr(string $string, integer $start, integer|null $length = null) : boolean|string
Return a part of a string in length via the 8-bit representation of raw bytes.
string | $string | The input string |
integer | $start | The starting position. |
integer|null | $length | The length to take. |
The extracted part of string or false on failure.
calculateDigest(string|mixed $inputData, integer $outputLength, boolean|integer|null $rawOutput = false) : boolean|string
Internal static method for single point consumption of the Keccak implementation.
string|mixed | $inputData | The data for hashing. |
integer | $outputLength | The output length for the algorithm. |
boolean|integer|null | $rawOutput | Flag for using raw byte output instead of HEX. |
Validation errors.
The output digest for the given input parameters.