Browse Source

where -> ,

Marcin Krzyżanowski 9 năm trước cách đây
mục cha
commit
677d6ce1b2
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      Sources/CryptoSwift/AES.swift
  2. 1 1
      Sources/CryptoSwift/PKCS5/PBKDF2.swift

+ 1 - 1
Sources/CryptoSwift/AES.swift

@@ -95,7 +95,7 @@ final public class AES: BlockCipher {
         self.blockMode = blockMode
         self.padding = padding
 
-        if let iv = iv where !iv.isEmpty {
+        if let iv = iv, !iv.isEmpty {
             self.iv = iv
         } else {
             let defaultIV = Array<UInt8>(repeating: 0, count: AES.blockSize)

+ 1 - 1
Sources/CryptoSwift/PKCS5/PBKDF2.swift

@@ -38,7 +38,7 @@ public extension PKCS5 {
         public init(password: Array<UInt8>, salt: Array<UInt8>, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha256) throws {
             precondition(iterations > 0)
             
-            guard let prf = HMAC(key: password, variant: variant) where iterations > 0 && !password.isEmpty && !salt.isEmpty else {
+            guard let prf = HMAC(key: password, variant: variant), iterations > 0 && !password.isEmpty && !salt.isEmpty else {
                 throw Error.invalidInput
             }