Swiftpack.co - Package - Bouke/HKDF

HKDF in Swift

HKDF is an HMAC based key derivation function that transforms any weak key material into cryptographically strong key material. It can be used, for example, to convert a session key derived in a secure remote password authentication into key material suitable for use in encryption, integrity checking or authentication.

Build Status

Usage:

// Input Key Material (ikm): weak input key material.
let ikm = Data(bytes: try! Random.generate(byteCount: 16))

// Output Key Material (okm): strong key material.
let okm = deriveKey(algorithm: .sha256, seed: ikm, count: 32)

More information can be found in the documentation.

Swift Compatibility

Swift 4 is required with version 3 of this package. Use version 2 if you need Swift 3 compatibility.

References:

Credits

This library was written by Bouke Haarsma.

Github

link
Stars: 2
Help us keep the lights on

Dependencies

Used By

Total: 2

Releases

3.0.0 - Oct 20, 2018

Added

  • Swift 4

3.0.1 - Oct 20, 2018

Changes

  • SwiftPM library

3.1.0 - Oct 19, 2018

Changes

  • Upgrade BlueCryptor to 1.x for Xcode 10 compatibility