Bläddra i källkod

Remove reverseBytes() workaround

Marcin Krzyżanowski 10 år sedan
förälder
incheckning
0b476dbf60
1 ändrade filer med 1 tillägg och 7 borttagningar
  1. 1 7
      CryptoSwift/Utils.swift

+ 1 - 7
CryptoSwift/Utils.swift

@@ -37,13 +37,7 @@ func rotateRight(x:UInt64, n:UInt64) -> UInt64 {
 }
 
 func reverseBytes(value: UInt32) -> UInt32 {
-    // rdar://18060945 - not working since Xcode6-Beta6, need to split in two variables
-    // return = ((value & 0x000000FF) << 24) | ((value & 0x0000FF00) << 8) | ((value & 0x00FF0000) >> 8)  | ((value & 0xFF000000) >> 24);
-    
-    // workaround
-    let tmp1 = ((value & 0x000000FF) << 24) | ((value & 0x0000FF00) << 8)
-    let tmp2 = ((value & 0x00FF0000) >> 8)  | ((value & 0xFF000000) >> 24)
-    return tmp1 | tmp2
+    return ((value & 0x000000FF) << 24) | ((value & 0x0000FF00) << 8) | ((value & 0x00FF0000) >> 8)  | ((value & 0xFF000000) >> 24);
 }
 
 func xor(a: [UInt8], b:[UInt8]) -> [UInt8] {