Swift-NaCL is a Swift binding to a fork of libsodium library. These libraries have a stated goal of improving usability, security and speed.
To add Swift-NaCL as dependency to your Xcode project, select File
> Swift Packages
> Add Package Dependency
, enter its repository URL: https://github.com/Kingpin-Apps/swift-ncal.git
and import SwiftNcal
as well as Clibsodium
.
Then, to use it in your source code, add:
import SwiftNcal
The Sodium library itself doesn't have to be installed on the system: the repository already includes a precompiled library for armv7, armv7s, arm64, as well as for the iOS simulator, WatchOS and Catalyst.
- Digital signatures
- Secret-key encryption
- Public-key encryption
- Hashing and message authentication
- Password based key derivation and password hashing