-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added TomCrypt as a Swift Package. Lots taken from libtom/libtomcryp…
- Loading branch information
0 parents
commit 1ed21d7
Showing
9 changed files
with
353 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/xcuserdata/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "vendor"] | ||
path = vendor | ||
url = [email protected]:libtom/libtomcrypt.git |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module TomCrypt [extern_c] { | ||
header "tomcrypt.h" | ||
export * | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "../vendor/src/headers/tomcrypt.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "TomMath", | ||
"repositoryURL": "https://github.com/DavidSouthgate/TomMathSPM.git", | ||
"state": { | ||
"branch": "main", | ||
"revision": "d14f446ea2f0de6cf9d907f408a50133ed53bdd9", | ||
"version": null | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// swift-tools-version:5.0 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "TomCrypt", | ||
platforms: [ | ||
.macOS(.v10_10), .iOS(.v9), .tvOS(.v9), .watchOS(.v4) | ||
], | ||
products: [ | ||
.library( | ||
name: "TomCrypt", | ||
targets: [ "TomCrypt" ]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/DavidSouthgate/TomMathSPM.git", .branchItem("main")) | ||
], | ||
targets: [ | ||
.target(name: "TomCrypt", | ||
dependencies: [ | ||
.product(name: "TomMath", package: "TomMathSPM") | ||
], | ||
path: ".", | ||
sources: [ | ||
"vendor/src" | ||
], | ||
publicHeadersPath: "Headers", | ||
cSettings: [ | ||
.headerSearchPath("vendor/src/headers"), | ||
.define("USE_LTM"), | ||
.define("LTM_DESC"), | ||
.define("LTC_NO_TEST"), | ||
.unsafeFlags(["-flto=thin"]) // for Dead Code Elimination | ||
]), | ||
.testTarget(name: "TomCryptTests", | ||
dependencies: [ | ||
"TomCrypt" | ||
], | ||
path: "Tests") | ||
], | ||
cLanguageStandard: .gnu11, | ||
cxxLanguageStandard: .gnucxx14 | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.