Add explicit namespace for used methods
authorjoshuaruesweg <ruesweg@woltlab.com>
Wed, 30 Sep 2020 11:36:00 +0000 (13:36 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 30 Sep 2020 13:57:29 +0000 (15:57 +0200)
16 files changed:
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb2.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Ipb3.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla1.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla2.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Joomla3.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Mybb1.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Phpfox3.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf1.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Smf2.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb3.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb4.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Vb5.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wbb2.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Wcf1e.class.php
wcfsetup/install/files/lib/system/user/authentication/password/algorithm/Xf1.class.php

index 04f8a524eefe21ef6a866a56b8f560650c166fa8..0e0c5ac9aa2e321f6c6f9a75c3aa151a41d21db3 100644 (file)
@@ -16,7 +16,7 @@ final class Ipb2 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Ipb2 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5(md5($password) . $salt);
+               return \md5(\md5($password) . $salt);
        }
        
        /**
index 21c979a2af0b0d8452c7f4c18723b5e113aff88f..ddd8fb3ec5fda2cd02600c210e62c5303451b5d6 100644 (file)
@@ -16,7 +16,7 @@ final class Ipb3 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Ipb3 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5(md5($salt) . md5($password));
+               return \md5(\md5($salt) . \md5($password));
        }
        
        /**
index 0e4f32c6c5f9fe8730cfcbec556b6b93ce085cb5..6be64299bd5d64c722ae085d1686a4609dec96a3 100644 (file)
@@ -16,7 +16,7 @@ final class Joomla1 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Joomla1 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5($password . $salt);
+               return \md5($password . $salt);
        }
        
        /**
index a565cd20adf6f4799a23d2e0b49d00cd8e2d6d0f..1a5bf50487041b5a63e8fa424b00d3ca69b4055b 100644 (file)
@@ -16,7 +16,7 @@ final class Joomla2 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Joomla2 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5($password . $salt);
+               return \md5($password . $salt);
        }
        
        /**
index e32a4f9b67c2213878660066d85ee25f4d69e379..4c24b74ce86c087e49fed3d1858df481b21482d6 100644 (file)
@@ -16,7 +16,7 @@ final class Joomla3 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Joomla3 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5($password . $salt);
+               return \md5($password . $salt);
        }
        
        /**
index 1af08430a639decd597b0a7b1a3a7a0161f9fe23..df4a579d8cdecf0562786cb1f7ee06960485028c 100644 (file)
@@ -16,7 +16,7 @@ final class Mybb1 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Mybb1 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5(md5($salt) . md5($password));
+               return \md5(\md5($salt) . \md5($password));
        }
        
        /**
index e04886954b7a89ddf454ca519b789772e57240a1..cd00be386ec734c4b92aa8be28b558f66d0dab86 100644 (file)
@@ -16,7 +16,7 @@ final class Phpfox3 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
index a2bcc9d8fedfc21851340362bd6d309e621504ea..2603994af74f411897b966b09d78f10d76362354 100644 (file)
@@ -16,7 +16,7 @@ final class Smf1 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Smf1 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return sha1($salt . $password);
+               return \sha1($salt . $password);
        }
        
        /**
index 89bdcf2d3591a2e3926dc20d2c625bcd02bcf654..c18c15c565442fd16631375ff0200cb404875fb2 100644 (file)
@@ -16,7 +16,7 @@ final class Smf2 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Smf2 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return sha1($salt . $password);
+               return \sha1($salt . $password);
        }
        
        /**
index 3534220a4c8253f8ea32e50f7bc64d49a1f71502..24546c4fe1ee6bcfa7ec2024075678207c96039b 100644 (file)
@@ -16,7 +16,7 @@ final class Vb3 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Vb3 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5(md5($password) . $salt);
+               return \md5(\md5($password) . $salt);
        }
        
        /**
index 26f1fbb484b95383676cf47c2f424bef933543b8..0aa3375082536f2bfc3491e389e1e0b675bee544 100644 (file)
@@ -16,7 +16,7 @@ final class Vb4 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Vb4 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5(md5($password) . $salt);
+               return \md5(\md5($password) . $salt);
        }
        
        /**
index 528bc85a2f1dadd8b3c30d6de177bdea6692126c..f911776c909593adc71053e833359991efd81bf7 100644 (file)
@@ -16,7 +16,7 @@ final class Vb5 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Vb5 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return md5(md5($password) . $salt);
+               return \md5(\md5($password) . $salt);
        }
        
        /**
index f5f60187969261a786de400050ade50b725ef3c3..bb5a8faf9e8839536c80c985efd89908de021b4d 100644 (file)
@@ -16,10 +16,10 @@ final class Wbb2 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               if (\hash_equals($hash, md5($password))) {
+               if (\hash_equals($hash, \md5($password))) {
                        return true;
                }
-               else if (\hash_equals($hash, sha1($password))) {
+               else if (\hash_equals($hash, \sha1($password))) {
                        return true;
                }
                
@@ -30,7 +30,7 @@ final class Wbb2 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function hash(string $password): string {
-               return sha1($password);
+               return \sha1($password);
        }
        
        /**
index 6c82b52e92895bfff677feb12c7bbd0fc99a3fd8..c2ea2fb30210c5f22001caa7672bd5ef19064b78 100644 (file)
@@ -16,7 +16,7 @@ final class Wcf1 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
@@ -34,7 +34,7 @@ final class Wcf1 implements IPasswordAlgorithm {
         * Returns the hashed password, hashed with a given salt.
         */
        private function hashWithSalt(string $password, string $salt): string {
-               return sha1($salt . sha1($salt . sha1($password)));
+               return \sha1($salt . \sha1($salt . \sha1($password)));
        }
        
        /**
index 4746f007e25f803cab0b0754dcb126452837c99f..b449f6cd7e84f021b795c9681920b94ccbebba47 100644 (file)
@@ -50,7 +50,7 @@ final class Wcf1e implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                return \hash_equals($hash, $this->hashWithSalt($password, $salt));
        }
index f74c3056796cf8a554f01b7f74f59f4b901bdd2f..d170488b9b50e08ba65ebafe885582201dd5d0bf 100644 (file)
@@ -16,7 +16,7 @@ final class Xf1 implements IPasswordAlgorithm {
         * @inheritDoc
         */
        public function verify(string $password, string $hash): bool {
-               [$hash, $salt] = explode(':', $hash, 2);
+               [$hash, $salt] = \explode(':', $hash, 2);
                
                if (\hash_equals($hash, \sha1(\sha1($password) . $salt))) {
                        return true;