h2c_string_to_hash example

/** * @param ?string $ctx * @param string $msg * @param int $hash_alg * @return string * @throws SodiumException */
    protected static function _string_to_element($ctx$msg$hash_alg)
    {
        return self::ristretto255_from_hash(
            self::h2c_string_to_hash(self::crypto_core_ristretto255_HASHBYTES, $ctx$msg$hash_alg)
        );
    }

    /** * @return string * @throws SodiumException * @throws Exception */
    public static function ristretto255_random()
    {
        return self::ristretto255_from_hash(
            
Home | Imprint | This part of the site doesn't use cookies.