Pure Swift implementations of cryptographic functions
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CryptoKit.playground
CryptoKit.xcodeproj
CryptoKit.xcworkspace
Sources/CryptoKit
Tests
.gitignore
.swift-version
.travis.yml
CryptoKit.podspec
LICENSE
Package.swift
README.md
build.sh

README.md

CryptoKit 🔑

Build Status Swift Version Carthage compatible spm compatible CocoaPods compatible Platform

A Swift framework containing implementations of cryptographic functions.

Features

Hashing Algorithms

  • MD5
  • SHA-1
  • SHA-224
  • SHA-256
  • SHA-384
  • SHA-512

HMAC (Hash-based Message Authentication Code)

  • 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 (c) 2016 Joe Christopher Paul Amanse

This software is distributed under the MIT License.