encode($compare,$this->salted_salt($source)); } public function encode(string $password,string $salt=NULL): string { return sprintf('{%s}%s',self::key,$this->salted_hash($password,'sha512',self::salt,$salt)); } }