McryptRandomStringGenerator
class McryptRandomStringGenerator implements RandomStringGenerator
Class McryptRandomStringGenerator
Traits
Class RandomStringGeneratorTrait
Constants
ERROR_MESSAGE |
|
Methods
validateLength(int $length)
Validates the length argument of a random string.
string
binToHex(string $binaryData, int $length)
Converts binary data to hexadecimal of arbitrary length.
__construct()
McryptRandomStringGenerator constructor.
string
getRandomString($length)
生成一个指定长度的随机字符串
Details
in RandomStringGeneratorTrait at line 20
validateLength(int $length)
Validates the length argument of a random string.
in RandomStringGeneratorTrait at line 39
string
binToHex(string $binaryData, int $length)
Converts binary data to hexadecimal of arbitrary length.
at line 26
__construct()
McryptRandomStringGenerator constructor.
at line 42
string
getRandomString($length)
生成一个指定长度的随机字符串