DIGESTION_KEY_128_BITS
DIGESTION_KEY_128_BITS
The hash digestion key 128-bit size.
Interface HashingKeyGenerationInterface - Interface for hashing key and salt string generation.
getHashingKey(integer $length = self::DIGESTION_KEY_128_BITS, boolean|integer $printable = true) : string
Generate a random HMAC key for hashing purposes.
Note: The output string can be in raw bytes of the $printable
parameter is set
to true
.
integer | $length | The desired output length (default => 16). |
boolean|integer | $printable | Flag for using only printable characters instead of bytes (default => true). |
Randomly generated HMAC key.
getHashingSalt(integer $length = self::DIGESTION_SALT_128_BITS, boolean|integer $printable = true) : string
Generate a random salt string for hashing purposes.
Note: The output string can be in raw bytes of the $printable
parameter is set
to true
.
integer | $length | The desired output length (default => 16). |
boolean|integer | $printable | Flag for using only printable characters instead of bytes (default => true). |
Randomly generated hashing salt.