ParagonIE\Halite\Util::keyed_hash PHP Method

keyed_hash() public static method

Expects a key (binary string). Returns hexadecimal characters.
public static keyed_hash ( string $input, string $key, integer $length = Sodium\CRYPTO_GENERICHASH_BYTES ) : string
$input string
$key string
$length integer
return string
    public static function keyed_hash(string $input, string $key, int $length = \Sodium\CRYPTO_GENERICHASH_BYTES) : string
    {
        return \Sodium\bin2hex(self::raw_keyed_hash($input, $key, $length));
    }