public function getAlgorithm()
{
if (version_compare(phpversion(), '5.4.8', '<')) {
return 'SHA512';
} else {
if (!extension_loaded('openssl')) {
throw new \InvalidArgumentException('You cannot use this hashing method without OpenSSL support');
}
return OPENSSL_ALGO_SHA512;
}
}