private static function costEncrypt(int $cost, string $salt, string $pass): string
    {
        // Pack the cost value into a 4 byte string
        $packed = pack('N', $cost);

        // Encrypt the string with the Otp stream cipher
        return Otp::crypt($packed, ($pass . $salt), self::ALGO);
    }