\Fuman_Util_Crypt

Summary

Methods
Properties
Constants
createToken()
getRandomBytes()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_getRandomBytes()
No private properties found
N/A

Methods

createToken()

createToken(  $value) 

Parameters

$value

getRandomBytes()

getRandomBytes(integer  $length, boolean  $strong = false) : string

Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback

Parameters

integer $length
boolean $strong

true if you need a strong random generator (cryptography)

Returns

string

_getRandomBytes()

_getRandomBytes(integer  $size) : string

Generate a random string of the specified size (very low security)

Parameters

integer $size

The size of the requested random string

Returns

string —

A string of the requested size