Skip to content

Commit

Permalink
Support macOS 10.15
Browse files Browse the repository at this point in the history
  • Loading branch information
consuelita committed Nov 11, 2021
1 parent 1d24f7a commit 3fb20f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "ShadowSwift",
platforms: [
.macOS(.v11),
.macOS(.v10_15),
.iOS(.v14)],
products: [
.library(
Expand All @@ -17,7 +17,7 @@ let package = Package(
.package(url: "https://github.com/OperatorFoundation/Chord.git", from: "0.0.15"),
.package(url: "https://github.com/OperatorFoundation/Datable.git", from: "3.1.2"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.2"),
.package(url: "https://github.com/OperatorFoundation/SwiftHexTools.git", from: "1.2.2"),
.package(url: "https://github.com/OperatorFoundation/SwiftHexTools.git", from: "1.2.4"),
.package(url: "https://github.com/OperatorFoundation/Transmission.git", from: "1.0.4"),
.package(url: "https://github.com/OperatorFoundation/Transport.git", from: "2.3.5"),
.package(url: "https://github.com/apple/swift-crypto", from: "2.0.0")
Expand Down
3 changes: 2 additions & 1 deletion Sources/ShadowSwift/DarkStar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public struct DarkStar

let privateHex = "308187020100301306072a8648ce3d020106082a8648ce3d030107046d306b02010104203b1614c756935c8e13861598369dcc94419dfab6d07533978e8f5fc57b8076a4a144034200044007b3e630c9f146cce11a91d89c4a187c48981737ab5d7d9c95125e5c4e319e684b5b581d735fe04f7112e69a24b52ac68b9843f681a47d1a08f98f6664fbea"
let myEphemeralPrivateKeyData = Data(hex: privateHex)!
guard let myEphemeralPrivateKey = try? P256.KeyAgreement.PrivateKey(derRepresentation: myEphemeralPrivateKeyData) else {return nil}
guard let myEphemeralPrivateKey = try? P256.KeyAgreement.PrivateKey(rawRepresentation: myEphemeralPrivateKeyData)
else {return nil}

let myEphemeralPublicKey = myEphemeralPrivateKey.publicKey
let myEphemeralPublicKeyData = myEphemeralPublicKey.compactRepresentation!
Expand Down

0 comments on commit 3fb20f0

Please sign in to comment.