Swiftpack.co - Package - OuterCorner/Sodium

Sodium

Platforms Carthage License

This project simply wraps libsodium into a dynamic framework for iOS and macOS.

Current libsodium version used: 1.0.18

Installation

You have a few different options:

Manual installation

  • Include the Sodium.xcodeproj as a dependency in your project. This is what the projects under Examples/ are doing. Doing this means Sodium.framework will be compiled alongside your project, including after every clean.
  • Use a pre-built Sodium.framework. You can find them under Releases.

SwiftPM

In your Package.swift, add Sodium as a dependency:

dependencies: [
  .package(url: "https://github.com/OuterCorner/Sodium", from: "1.0.18")
],

Associate the dependency with your target:

targets: [
  .target(name: "App", dependencies: ["Sodium"])
]

Usage

After importing the umbrella header:

#import <Sodium/Sodium.h>

You can simply start using libsodium APIs as usual.

crypto_secretbox_keygen(key);
randombytes_buf(nonce, sizeof(nonce));

See example projects under Examples/.

License

This project is licensed under the MIT License - see LICENSE.

Note the underlying libsodium library LICENSE still applies when using this project.

Github

link
Stars: 0

Dependencies

Used By

Total: 0

Releases

Added support for the Swift Package Manager - 2020-10-14 12:13:58

1.0.17_190312.0 - 2019-03-12 20:42:21

• Enabled full build

- 2019-03-09 21:40:07