Class ValidationHash

Methods summary

protected static string
# generate( integer $len = 64 )

Generates a random string.

protected static
# removeExpired( integer $type )

Removes old entries for the supplied type.

public static string
# add( integer $uID, integer $type, boolean $singeHashAllowed = false, integer $hashLength = 64 )

Adds a hash to the lookup table for a user and type, removes any other existing hashes for the same user and type.

public static integer
# getUserID( string $hash, integer $type )

Gets the users id for a given hash and type.