public function getRandomString($length)
{
if (empty($length)) {
throw new \InvalidArgumentException("Length can't be empty.");
}
$random = array();
for ($i = 0; $i < $length; $i++) {
$random[] = $this->chars[mt_rand(0, $this->chars_count - 1)];
}
return implode('', $random);
}