Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ concurrency:
cancel-in-progress: true
# Keep versions in sync with README
env:
SWIFTLINT_VERSION: 0.55.1
SWIFTFORMAT_VERSION: 0.54.0
SWIFTLINT_VERSION: 0.57.0
SWIFTFORMAT_VERSION: 0.54.6
jobs:
swift-tests:
timeout-minutes: 15
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ We'd like this package to quickly embrace Swift language and toolchain improveme
## Developing Swift Homomorphic Encryption
### Dependencies
Developing Swift Homomorphic Encryption requires:
* [Nick Lockwood SwiftFormat](https://github.com/nicklockwood/SwiftFormat), v0.54.0
* [Nick Lockwood SwiftFormat](https://github.com/nicklockwood/SwiftFormat), 0.54.6
* [pre-commit](https://pre-commit.com)
* [swift-format](https://github.com/apple/swift-format), v510.1.0
* [swift-protobuf](https://github.com/apple/swift-protobuf), v1.28.1
* [SwiftLint](https://github.com/realm/SwiftLint), v0.55.1
* [swift-format](https://github.com/swiftlang/swift-format), 600.0.0
* [swift-protobuf](https://github.com/apple/swift-protobuf), 1.28.1
* [SwiftLint](https://github.com/realm/SwiftLint), 0.57.0

### Building
You can build Swift Homomorphic Encryption either via Xcode or via command line in a terminal.
Expand Down
2 changes: 1 addition & 1 deletion Sources/HomomorphicEncryption/Keys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public struct EvaluationKeyConfig: Codable, Equatable, Hashable, Sendable {
}

extension Sequence<EvaluationKeyConfig> {
/// Computes the union of ``EvaluationKeyConfig``s.
/// Computes the union of evaluation key configurations.
///
/// The union of ``EvaluationKeyConfig``s is a configuration whose:
/// * Galois elements is a union of each configuration's Galois elements
Expand Down
3 changes: 3 additions & 0 deletions Sources/PIRProcessDatabase/ProcessDatabase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ struct Arguments: Codable, Equatable, Hashable, Sendable {
encoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
// swiftlint:disable:next force_try
let data = try! encoder.encode(defaultArguments)
// swiftlint:disable:next optional_data_string_conversion
return String(decoding: data, as: UTF8.self)
}

Expand Down Expand Up @@ -233,6 +234,7 @@ struct ResolvedArguments: CustomStringConvertible, Encodable {
encoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
// swiftlint:disable:next force_try
let data = try! encoder.encode(self)
// swiftlint:disable:next optional_data_string_conversion
return String(decoding: data, as: UTF8.self)
}

Expand Down Expand Up @@ -494,6 +496,7 @@ extension ProcessKeywordDatabase.ShardValidationResult {
encoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
// swiftlint:disable:next force_try
let data = try! encoder.encode(descriptionDict)
// swiftlint:disable:next optional_data_string_conversion
let description = String(decoding: data, as: UTF8.self)
return description.replacingOccurrences(of: "\"", with: "")
}
Expand Down
3 changes: 3 additions & 0 deletions Sources/PNNSProcessDatabase/ProcessDatabase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ struct Arguments: Codable, Equatable, Hashable, Sendable {
encoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
// swiftlint:disable:next force_try
let data = try! encoder.encode(defaultArguments)
// swiftlint:disable:next optional_data_string_conversion
return String(decoding: data, as: UTF8.self)
}

Expand Down Expand Up @@ -157,6 +158,7 @@ struct ResolvedArguments: CustomStringConvertible, Encodable {
encoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
// swiftlint:disable:next force_try
let data = try! encoder.encode(self)
// swiftlint:disable:next optional_data_string_conversion
return String(decoding: data, as: UTF8.self)
}

Expand Down Expand Up @@ -321,6 +323,7 @@ extension ValidationResult {
encoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
// swiftlint:disable:next force_try
let data = try! encoder.encode(descriptionDict)
// swiftlint:disable:next optional_data_string_conversion
let description = String(decoding: data, as: UTF8.self)
return description.replacingOccurrences(of: "\"", with: "")
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/PrivateInformationRetrieval/Util.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import Foundation

extension [UInt8] {
func utf8OrBase64() -> String {
// swiftlint doesn't recognize the API
// swiftlint:disable:next optional_data_string_conversion
if let utf8 = String(validating: self, as: UTF8.self) {
"\(utf8) (utf8)"
} else {
Expand Down