public function create($string)
{
$hash = null;
$prefix = $this->bits == 512 ? '$6$' : '$5$';
$prefix .= 'rounds=' . $this->rounds . '$';
$this->salt = null === $this->salt ? substr(str_replace('+', '.', base64_encode(String::random(32))), 0, 16) : substr(str_replace('+', '.', base64_encode($this->salt)), 0, 16);
$hash = crypt($string, $prefix . $this->salt);
return $hash;
}