You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-11-23 11:22:22 +03:00
phpcs insists on some brace changes
This commit is contained in:
@@ -48,7 +48,8 @@ class DovecotCrypt extends Crypt
|
||||
|
||||
|
||||
|
||||
public function crypt($algorithm) {
|
||||
public function crypt($algorithm)
|
||||
{
|
||||
if (!array_key_exists($algorithm, $this->password_schemes)) {
|
||||
$this->errormsg[] = "This password scheme isn't supported. Check our Wiki!";
|
||||
return false;
|
||||
@@ -62,7 +63,8 @@ class DovecotCrypt extends Crypt
|
||||
return true;
|
||||
}
|
||||
|
||||
public function verify($algorithm, $password) {
|
||||
public function verify($algorithm, $password)
|
||||
{
|
||||
if (!array_key_exists($algorithm, $this->password_schemes)) {
|
||||
$this->errormsg[] = "This password scheme isn't supported. Check our Wiki!";
|
||||
return false;
|
||||
@@ -78,22 +80,28 @@ class DovecotCrypt extends Crypt
|
||||
return $this->$func($this->plain, $password);
|
||||
}
|
||||
|
||||
private function __crypt_verify($plaintext, $password) {
|
||||
private function __crypt_verify($plaintext, $password)
|
||||
{
|
||||
$crypted = crypt($plaintext, $password);
|
||||
return strcmp($crypted, $password) == 0;
|
||||
}
|
||||
private function __crypt_generate($plaintext) {
|
||||
private function __crypt_generate($plaintext)
|
||||
{
|
||||
$password = crypt($plaintext);
|
||||
return $password;
|
||||
}
|
||||
private function __md5_generate($plaintext) {
|
||||
private function __md5_generate($plaintext)
|
||||
{
|
||||
return $plaintext;
|
||||
}
|
||||
private function __sha1_generate() {
|
||||
private function __sha1_generate()
|
||||
{
|
||||
}
|
||||
private function __plain_generate() {
|
||||
private function __plain_generate()
|
||||
{
|
||||
}
|
||||
private function __cram_md5_generate($plaintext) {
|
||||
private function __cram_md5_generate($plaintext)
|
||||
{
|
||||
|
||||
#http://hg.dovecot.org/dovecot-1.2/file/84373d238073/src/lib/hmac-md5.c
|
||||
#http://hg.dovecot.org/dovecot-1.2/file/84373d238073/src/auth/password-scheme.c cram_md5_generate
|
||||
@@ -110,7 +118,8 @@ class DovecotCrypt extends Crypt
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function custom_hmac($algo, $data, $key, $raw_output = false) {
|
||||
public function custom_hmac($algo, $data, $key, $raw_output = false)
|
||||
{
|
||||
$algo = strtolower($algo);
|
||||
$pack = 'H'.strlen($algo('test'));
|
||||
$size = 64;
|
||||
|
||||
Reference in New Issue
Block a user