PHP Class Thruway\Common\Utils

Afficher le fichier Open project: voryx/thruway Class Usage Examples

Méthodes publiques

Méthode Description
checkPrecision ( ) Changes the Precision for PHP configs that default to less than 16
compat_pbkdf2 ( string $algo, string $password, string $salt, integer $iterations, integer $length, boolean $rawOutput = false ) : string Generate a PBKDF2 key derivation of a supplied password
getDerivedKey ( string $key, string $salt, integer $iterations = 1000, integer $keyLen = 32 ) : string Encode and get derived key
getUniqueId ( ) : mixed Generate a unique id for sessions and requests
uriIsValid ( $uri ) : boolean Strict URI Test

Method Details

checkPrecision() public static méthode

Changes the Precision for PHP configs that default to less than 16
public static checkPrecision ( )

compat_pbkdf2() public static méthode

This is a hash_pbkdf2() implementation for PHP versions 5.3 and 5.4.
See also: https://gist.github.com/rsky/5104756
public static compat_pbkdf2 ( string $algo, string $password, string $salt, integer $iterations, integer $length, boolean $rawOutput = false ) : string
$algo string
$password string
$salt string
$iterations integer
$length integer
$rawOutput boolean
Résultat string

getDerivedKey() public static méthode

Encode and get derived key
public static getDerivedKey ( string $key, string $salt, integer $iterations = 1000, integer $keyLen = 32 ) : string
$key string
$salt string
$iterations integer
$keyLen integer
Résultat string

getUniqueId() public static méthode

Generate a unique id for sessions and requests
public static getUniqueId ( ) : mixed
Résultat mixed

uriIsValid() public static méthode

Strict URI Test
public static uriIsValid ( $uri ) : boolean
$uri
Résultat boolean