Swift Package Index


A simple wrapper in Swift around the CommonCrypto framework


  • The latest stable release is 1.0.3. Released 2 years ago.
  • The last commit to master was almost 2 years ago.

Swift Version Compatibility

  • 1.0.3
    5.3
    5.2
    5.1
    5.0
    4.2
  • master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 1.0.3 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

SwiftCrypto

A simple wrapper in Swift around the CommonCrypto framework.

Build Status

Swift Package Manager

// swift-tools-version:5.0
import PackageDescription

let package = Package(
    name: "YourProject",
    dependencies: [
        .package(url: "https://github.com/jernejstrasner/SwiftCrypto.git", from: "1.0.1")
    ],
    targets: [
        .target(
            name: "YourTarget",
            dependencies: ["SwiftCrypto"]
        ),
    ]
)

Usage

Digest

let hash = "string".sha512

HMAC

let hmac = "string".digest(.SHA512, key: "some key")