HKDF utility in Swift for both iOS and OS X
This is a porting of Frederic Jacobs KDFKit to Swift with the addition it supports also OS X
RFC5869-compliant key derivation function.
let derivedData = HKDFKit.deriveKey(HKDFKit.Hash.SHA256, seed: aSeed, info: anInfo, salt: aSalt, outputSize: anOutputSize)
TextSecure v2 protocol uses different bounds for the HKDF function.
let derivedData = let derivedData = HKDFKit.TextSecureV2deriveKey(HKDFKit.Hash.SHA256, seed: aSeed, info: anInfo, salt: aSalt, outputSize: anOutputSize)
API reference is available on CocoaDocs.
Add this line to your Podfile
pod 'HKDFKit', '~> version number'
Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html