public static function getPasshash($password)
	{
		// Get the password encryption/hashing mechanism
		$config = \Component::params('com_members');
		$type   = $config->get('passhash_mechanism', 'CRYPT_SHA512');

		switch ($type)
		{
			case 'MD5':
				$passhash = "{MD5}" . base64_encode(pack('H*', md5($password)));
				break;

			case 'CRYPT_SHA512':
			default:
				$encrypted = crypt($password, '$6$' . self::genRandomPassword(8) . '$');
				$passhash = "{CRYPT}" . $encrypted;
				break;
		}

		return $passhash;
	}
public static function getPasshash($password)
	{
		// Get the password encryption/hashing mechanism
		$config = \Component::params('com_members');
		$type   = $config->get('passhash_mechanism', 'CRYPT_SHA512');

		switch ($type)
		{
			case 'MD5':
				$passhash = "{MD5}" . base64_encode(pack('H*', md5($password)));
				break;

			case 'CRYPT_SHA512':
			default:
				$encrypted = crypt($password, '$6$' . self::genRandomPassword(8) . '$');
				$passhash = "{CRYPT}" . $encrypted;
				break;
		}

		return $passhash;
	}
public static function getPasshash ( $ password ) { // Get the password encryption/hashing mechanism $ config = \ Component :: params ( 'com_members' ) ; $ type = $ config -> get ( 'passhash_mechanism' , 'CRYPT_SHA512' ) ; switch ( $ type ) { case 'MD5' : $ passhash = "{MD5}" . base64_encode ( pack ( 'H*' , md5 ( $ password ) ) ) ; break ; case 'CRYPT_SHA512' : default : $ encrypted = crypt ( $ password , '$6$' . self :: genRandomPassword ( 8 ) . '$' ) ; $ passhash = "{CRYPT}" . $ encrypted ; break ; } return $ passhash ; }
Get a hash of a password

@param   string  $password
@return  string
Get a hash of a password