A Swift framework containing implementations of cryptographic functions.
- MD5
- SHA-1
- SHA-224
- SHA-256
- SHA-384
- SHA-512
- HMAC (using any of the implemented hash functions)
Try CryptoKit API right now in IBM Swift Sandbox.
let message = "The quick brown fox jumps over the lazy dog".data(using: .utf8)!
let hash = message.digest(using: .sha256) // Supports MD5, SHA-1 and SHA-2 variants
let hmac = HMAC(key: secret, message: message, hashFunction: .sha1)
Copyright (c) 2016 Joe Christopher Paul Amanse
This software is distributed under the MIT License.