Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Package.swift file to build Sweet B as a Swift package #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xrme
Copy link

@xrme xrme commented Apr 23, 2022

Allow Sweet B to be fetched and built as a Swift package.

This avoids the need to embed the Sweet B sources (or use a git submodule) when using Sweet B in a Swift-based project.

@bmastenbrook bmastenbrook self-requested a review April 25, 2022 14:11
Comment on lines +47 to +48
After adding this package to your target's dependencies, you can write
stuff like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After adding this package to your target's dependencies, you can write
stuff like this:
After adding this package to your target's dependencies, you use it
like this:


var hkdf = sb_hkdf_state_t()
sb_hkdf_extract(&hkdf, salt, salt.count, ikm, ikm.count)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to convert this into an actual test that we could run in CI? I'm a complete novice when it comes to Swift, but it does seem like you can add a test target to a Swift package. Ideally I would love to see an example of using each of the major functions as a test.

@bmastenbrook bmastenbrook self-assigned this Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants