Merge "Fixup contenttype stuff in UserMailer"
[lhc/web/wiklou.git] / includes / password / EncryptedPassword.php
index 39da32d..7b3d9f9 100644 (file)
@@ -32,10 +32,10 @@ class EncryptedPassword extends ParameterizedPassword {
        }
 
        protected function getDefaultParams() {
-               return array(
+               return [
                        'cipher' => $this->config['cipher'],
                        'secret' => count( $this->config['secrets'] ) - 1
-               );
+               ];
        }
 
        public function crypt( $password ) {
@@ -47,7 +47,7 @@ class EncryptedPassword extends ParameterizedPassword {
                                        $secret, 0, base64_decode( $this->args[0] )
                                ) );
                } else {
-                       $underlyingPassword = $this->factory->newFromType( $this->config['underlying'], $this->config );
+                       $underlyingPassword = $this->factory->newFromType( $this->config['underlying'] );
                }
 
                $underlyingPassword->crypt( $password );
@@ -55,7 +55,7 @@ class EncryptedPassword extends ParameterizedPassword {
 
                $this->hash = openssl_encrypt(
                        $underlyingPassword->toString(), $this->params['cipher'], $secret, 0, $iv );
-               $this->args = array( base64_encode( $iv ) );
+               $this->args = [ base64_encode( $iv ) ];
        }
 
        /**
@@ -91,7 +91,7 @@ class EncryptedPassword extends ParameterizedPassword {
                                0,
                                $iv
                        ) );
-               $this->args = array( base64_encode( $iv ) );
+               $this->args = [ base64_encode( $iv ) ];
 
                return true;
        }