mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
PR review changes
This commit is contained in:
parent
bd9cb92035
commit
5337a721b0
1 changed files with 0 additions and 14 deletions
|
|
@ -176,31 +176,24 @@ class Auth
|
||||||
case 'argon2':
|
case 'argon2':
|
||||||
$hasher = new Argon2($options);
|
$hasher = new Argon2($options);
|
||||||
return $hasher->hash($string);
|
return $hasher->hash($string);
|
||||||
break;
|
|
||||||
case 'bcrypt':
|
case 'bcrypt':
|
||||||
$hasher = new Bcrypt($options);
|
$hasher = new Bcrypt($options);
|
||||||
return $hasher->hash($string);
|
return $hasher->hash($string);
|
||||||
break;
|
|
||||||
case 'md5':
|
case 'md5':
|
||||||
$hasher = new Md5($options);
|
$hasher = new Md5($options);
|
||||||
return $hasher->hash($string);
|
return $hasher->hash($string);
|
||||||
break;
|
|
||||||
case 'sha':
|
case 'sha':
|
||||||
$hasher = new Sha($options);
|
$hasher = new Sha($options);
|
||||||
return $hasher->hash($string);
|
return $hasher->hash($string);
|
||||||
break;
|
|
||||||
case 'phpass':
|
case 'phpass':
|
||||||
$hasher = new Phpass($options);
|
$hasher = new Phpass($options);
|
||||||
return $hasher->hash($string);
|
return $hasher->hash($string);
|
||||||
break;
|
|
||||||
case 'scrypt':
|
case 'scrypt':
|
||||||
$hasher = new Scrypt($options);
|
$hasher = new Scrypt($options);
|
||||||
return $hasher->hash($string);
|
return $hasher->hash($string);
|
||||||
break;
|
|
||||||
case 'scryptMod':
|
case 'scryptMod':
|
||||||
$hasher = new Scryptmodified($options);
|
$hasher = new Scryptmodified($options);
|
||||||
return $hasher->hash($string);
|
return $hasher->hash($string);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new \Exception('Hashing algorithm \'' . $algo . '\' is not supported.');
|
throw new \Exception('Hashing algorithm \'' . $algo . '\' is not supported.');
|
||||||
}
|
}
|
||||||
|
|
@ -232,31 +225,24 @@ class Auth
|
||||||
case 'argon2':
|
case 'argon2':
|
||||||
$hasher = new Argon2($options);
|
$hasher = new Argon2($options);
|
||||||
return $hasher->verify($plain, $hash);
|
return $hasher->verify($plain, $hash);
|
||||||
break;
|
|
||||||
case 'bcrypt':
|
case 'bcrypt':
|
||||||
$hasher = new Bcrypt($options);
|
$hasher = new Bcrypt($options);
|
||||||
return $hasher->verify($plain, $hash);
|
return $hasher->verify($plain, $hash);
|
||||||
break;
|
|
||||||
case 'md5':
|
case 'md5':
|
||||||
$hasher = new Md5($options);
|
$hasher = new Md5($options);
|
||||||
return $hasher->verify($plain, $hash);
|
return $hasher->verify($plain, $hash);
|
||||||
break;
|
|
||||||
case 'sha':
|
case 'sha':
|
||||||
$hasher = new Sha($options);
|
$hasher = new Sha($options);
|
||||||
return $hasher->verify($plain, $hash);
|
return $hasher->verify($plain, $hash);
|
||||||
break;
|
|
||||||
case 'phpass':
|
case 'phpass':
|
||||||
$hasher = new Phpass($options);
|
$hasher = new Phpass($options);
|
||||||
return $hasher->verify($plain, $hash);
|
return $hasher->verify($plain, $hash);
|
||||||
break;
|
|
||||||
case 'scrypt':
|
case 'scrypt':
|
||||||
$hasher = new Scrypt($options);
|
$hasher = new Scrypt($options);
|
||||||
return $hasher->verify($plain, $hash);
|
return $hasher->verify($plain, $hash);
|
||||||
break;
|
|
||||||
case 'scryptMod':
|
case 'scryptMod':
|
||||||
$hasher = new Scryptmodified($options);
|
$hasher = new Scryptmodified($options);
|
||||||
return $hasher->verify($plain, $hash);
|
return $hasher->verify($plain, $hash);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
throw new \Exception('Hashing algorithm \'' . $algo . '\' is not supported.');
|
throw new \Exception('Hashing algorithm \'' . $algo . '\' is not supported.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue