浏览代码

Make public PBKDF2 init

Marcin Krzyżanowski 9 年之前
父节点
当前提交
e8c504b71d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Sources/CryptoSwift/PKCS5/PBKDF2.swift

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

@@ -20,7 +20,7 @@ public extension PKCS5 {
         private let numBlocks: UInt  // l
         private let prf: HMAC
 
-        init(password: [UInt8], salt: [UInt8], iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */ , hashVariant: HMAC.Variant = .sha256) throws {
+        public init(password: [UInt8], salt: [UInt8], iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */ , hashVariant: HMAC.Variant = .sha256) throws {
             guard let prf = HMAC(key: password, variant: hashVariant) where (iterations > 0) && (password.count > 0) && (salt.count > 0) else {
                 throw Error.InvalidInput
             }