Explorar o código

Fix Blowfish for 32-bit arch. Fixes #382.

Marcin Krzyżanowski %!s(int64=8) %!d(string=hai) anos
pai
achega
963e6c9370
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Sources/CryptoSwift/Blowfish.swift

+ 1 - 1
Sources/CryptoSwift/Blowfish.swift

@@ -451,7 +451,7 @@ public final class Blowfish {
     }
 
     private func F(x: UInt32) -> UInt32 {
-        return ((self.S[0][Int(x >> 24) & 0xFF] &+ self.S[1][Int(x >> 16) & 0xFF]) ^ self.S[2][Int(x >> 8) & 0xFF]) &+ self.S[3][Int(x) & 0xFF]
+        return ((self.S[0][Int(x >> 24) & 0xFF] &+ self.S[1][Int(x >> 16) & 0xFF]) ^ self.S[2][Int(x >> 8) & 0xFF]) &+ self.S[3][Int(x & 0xFF)]
     }
 }