phpBB::authenticate_pass( string $password,  $serialized_pass )

Check for correct password


Description Description


Parameters Parameters

$password

(Required) The password in plain text

$hash

(Required) The stored password hash


Top ↑

Return Return

(bool) Returns true if the password is correct, false if not.


Top ↑

Source Source

File: includes/admin/converters/phpBB.php

	public function authenticate_pass( $password, $serialized_pass ) {
		$itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
		$pass_array = unserialize( $serialized_pass );
		if ( strlen( $pass_array['hash'] ) == 34 ) {
			return ( $this->_hash_crypt_private( $password, $pass_array['hash'], $itoa64 ) === $pass_array['hash'] ) ? true : false;
		}

		return ( md5( $password ) === $pass_array['hash'] ) ? true : false;
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.