Skip to content

Commit

Permalink
use auto-bridging
Browse files Browse the repository at this point in the history
  • Loading branch information
bitgamma committed Apr 16, 2021
1 parent 8f1c44c commit 1b3ea13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/Keycard/Crypto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ class Crypto {

precondition(salt.count < 133, "Salt must be less than 133 bytes length")
var saltBytes = salt
var passwordBytes = Array(password.utf8)
var outKey: [UInt8] = [UInt8](repeating: 0, count: keyLength)
let result = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2),
&passwordBytes,
passwordBytes.count,
password,
password.lengthOfBytes(using: String.Encoding.utf8),
&saltBytes,
saltBytes.count,
prf,
Expand Down

0 comments on commit 1b3ea13

Please sign in to comment.