소스 검색

Fixed Hash

Jinhui Zhu 7 년 전
부모
커밋
9b424ff699
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Library/Hash.php

+ 1 - 1
src/Library/Hash.php

@@ -139,7 +139,7 @@ class Hash
     public function MD5Hash($str) // 0.050
     {
         $hash = md5($str);
-        $hash = $hash[0] | ($hash[1] << 8) | ($hash[2] << 16) | ($hash[3] << 24) | ($hash[4] << 32) | ($hash[5] << 40) | ($hash[6] << 48) | ($hash[7] << 56);
+        $hash = ord($hash[0]) | (ord($hash[1]) << 8) | (ord($hash[2]) << 16) | (ord($hash[3]) << 24) | (ord($hash[4]) << 32) | (ord($hash[5]) << 40) | (ord($hash[6]) << 48) | (ord($hash[7]) << 56);
         return $hash % self::HASH_MODE;
     }
 }