Hash::unique (method)

Return to Knowledgebase

Purpose

Create a unique, time-based hash

Location

users/classes/Hash.php

Parameters

This function does not take any arguments

Example

$hash = Hash::unique();

Further Documentation:

Creates a hash of PHP's unique() function. The unique function uses microtime, so the idea is that no matter how many times you create a hash, it will not be repeated. This is not great for cryptography but it is great to be part of a key or some sort of unique code.