# fluent-cart/1.6.4/api/Hasher/Hash.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 28 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/api/Hasher/Hash.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/api/Hasher/Hash.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/api/Hasher/Hash.php#L10-L20`.

```php
<?php

namespace FluentCart\Api\Hasher;

class Hash
{
    private static $algo = 'md5';

    private static $secret = 'wp-fluent-cart-secret-key';

    public static function random(): string
    {
        $str = wp_generate_uuid4() . '_' . time();

        return hash_hmac(static::$algo, $str, static::$secret);
    }

    public static function make(string $string): string
    {
        return hash_hmac(static::$algo, $string, static::$secret);
    }

    public static function verify(string $knownString, string $userString): bool
    {
        return hash_equals($knownString, $userString);
    }
}

```
