Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing deprecated PasswordEncryptor::compare() method

Use PasswordEncryptor::check() instead
  • Loading branch information...
commit 587d669861f53f2a8a60edf93bc48e9d68d5a5ea 1 parent f122b10
Sean Harvey halkyon authored
Showing with 0 additions and 25 deletions.
  1. +0 −25 security/PasswordEncryptor.php
25 security/PasswordEncryptor.php
View
@@ -104,22 +104,6 @@ public function salt($password, $member = null) {
/**
* This usually just returns a strict string comparison,
- * but is necessary for {@link PasswordEncryptor_LegacyPHPHash}.
- *
- * @param String $hash1
- * @param String $hash2
- * @return boolean
- *
- * @deprecated 3.0 - Use PasswordEncryptor::check() instead.
- */
- public function compare($hash1, $hash2) {
- Deprecation::notice('3.0.0',
- 'PasswordEncryptor::compare() is deprecated, replaced by PasswordEncryptor::check().');
- return ($hash1 === $hash2);
- }
-
- /**
- * This usually just returns a strict string comparison,
* but is necessary for retain compatibility with password hashed
* with flawed algorithms - see {@link PasswordEncryptor_LegacyPHPHash} and
* {@link PasswordEncryptor_Blowfish}
@@ -355,15 +339,6 @@ public function encrypt($password, $salt = null, $member = null) {
// letters.
return substr(base_convert($password, 16, 36), 0, 64);
}
-
- public function compare($hash1, $hash2) {
- Deprecation::notice('3.0.0',
- 'PasswordEncryptor::compare() is deprecated, replaced by PasswordEncryptor::check().');
-
- // Due to flawed base_convert() floating poing precision,
- // only the first 10 characters are consistently useful for comparisons.
- return (substr($hash1, 0, 10) === substr($hash2, 0, 10));
- }
public function check($hash, $password, $salt = null, $member = null) {
// Due to flawed base_convert() floating poing precision,
Please sign in to comment.
Something went wrong with that request. Please try again.