CryptoKit 0.4.0

CryptoKit 0.4.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Dec 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by Chris Amanse.



CryptoKit 0.4.0

CryptoKit 🔑

A Swift framework containing implementations of cryptographic functions.

Features

Hashing Algorithms

  • [x] MD5
  • [x] SHA-1
  • [x] SHA-224
  • [x] SHA-256
  • [x] SHA-384
  • [x] SHA-512

HMAC (Hash-based Message Authentication Code)

  • [x] HMAC (using any of the implemented hash functions)

Usage

Try CryptoKit API right now in IBM Swift Sandbox.

Hash / Digest

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

HMAC

let hmac = HMAC(key: secret, message: message, hashFunction: .sha1)

License

Copyright © 2016 Joe Christopher Paul Amanse

This software is distributed under the MIT License.