WordPress at Your Fingertips
function is not described

ParagonIE_Sodium_Core_Ristretto255::h2c_string_to_hash() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Core_Ristretto255{}

No Hooks.

Return

String.

Usage

$result = ParagonIE_Sodium_Core_Ristretto255::h2c_string_to_hash( $hLen, $ctx, $msg, $hash_alg );
$hLen(int) (required)
-
$ctx(?string) (required)
-
$msg(string) (required)
-
$hash_alg(int) (required)
-

Code of ParagonIE_Sodium_Core_Ristretto255::h2c_string_to_hash() WP 5.8.2

public static function h2c_string_to_hash($hLen, $ctx, $msg, $hash_alg)
{
    switch ($hash_alg) {
        case self::CORE_H2C_SHA256:
            return self::h2c_string_to_hash_sha256($hLen, $ctx, $msg);
        case self::CORE_H2C_SHA512:
            return self::h2c_string_to_hash_sha512($hLen, $ctx, $msg);
        default:
            throw new SodiumException('Invalid H2C hash algorithm');
    }
}