26 trait PseudoRandomStringGeneratorTrait
35 public function validateLength($length)
37 if (!is_int($length)) {
38 throw new \InvalidArgumentException(
'getPseudoRandomString() expects an integer for the string length');
42 throw new \InvalidArgumentException(
'getPseudoRandomString() expects a length greater than 1');
54 public function binToHex($binaryData, $length)
56 return \substr(\bin2hex($binaryData), 0, $length);