A simple wrapper in Swift around the CommonCrypto framework.
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "YourProject",
dependencies: [
.package(url: "https://github.com/jernejstrasner/SwiftCrypto.git", .branch("master"))
],
targets: [
.target(
name: "YourTarget",
dependencies: ["SwiftCrypto"]
),
]
)
let hash = "string".sha512
let hmac = "string".digest(.SHA512, key: "some key")