diff --git a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift index fd01418..223b935 100644 --- a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift +++ b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHKeyWriter.swift @@ -47,7 +47,7 @@ public struct OpenSSHKeyWriter { extension OpenSSHKeyWriter { /// Creates an OpenSSH protocol style data object, which has a length header, followed by the data payload. - /// - Parameter data: the data payload. + /// - Parameter data: The data payload. /// - Returns: OpenSSH data. public func lengthAndData(of data: Data) -> Data { let rawLength = UInt32(data.count) @@ -57,8 +57,8 @@ extension OpenSSHKeyWriter { /// The fully qualified OpenSSH identifier for the algorithm. /// - Parameters: - /// - algorithm: the algorithm to identify. - /// - length: the key length of the algorithm. + /// - algorithm: The algorithm to identify. + /// - length: The key length of the algorithm. /// - Returns: The OpenSSH identifier for the algorithm. public func curveType(for algorithm: Algorithm, length: Int) -> String { switch algorithm { @@ -69,8 +69,8 @@ extension OpenSSHKeyWriter { /// The OpenSSH identifier for an algorithm. /// - Parameters: - /// - algorithm: the algorithm to identify. - /// - length: the key length of the algorithm. + /// - algorithm: The algorithm to identify. + /// - length: The key length of the algorithm. /// - Returns: The OpenSSH identifier for the algorithm. private func curveIdentifier(for algorithm: Algorithm, length: Int) -> String { switch algorithm { diff --git a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift index 89ae564..027b63d 100644 --- a/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift +++ b/Sources/Packages/Sources/SecretKit/OpenSSH/OpenSSHReader.swift @@ -6,7 +6,7 @@ public class OpenSSHReader { var remaining: Data /// Initialize the reader with an OpenSSH data payload. - /// - Parameter data: the data to read. + /// - Parameter data: The data to read. public init(data: Data) { remaining = Data(data) } diff --git a/Sources/Packages/Sources/SecretKit/Types/Secret.swift b/Sources/Packages/Sources/SecretKit/Types/Secret.swift index aa36314..154a2d3 100644 --- a/Sources/Packages/Sources/SecretKit/Types/Secret.swift +++ b/Sources/Packages/Sources/SecretKit/Types/Secret.swift @@ -3,7 +3,7 @@ import Foundation /// The base protocol for describing a Secret public protocol Secret: Identifiable, Hashable { - /// A user-facing string identifying the Secret + /// A user-facing string identifying the Secret. var name: String { get } /// The algorithm this secret uses. var algorithm: Algorithm { get } diff --git a/Sources/Packages/Sources/SecretKit/Types/SecretStore.swift b/Sources/Packages/Sources/SecretKit/Types/SecretStore.swift index 6f35e3f..6edef38 100644 --- a/Sources/Packages/Sources/SecretKit/Types/SecretStore.swift +++ b/Sources/Packages/Sources/SecretKit/Types/SecretStore.swift @@ -46,7 +46,10 @@ public protocol SecretStoreModifiable: SecretStore { /// - secret: The ``Secret`` to delete. func delete(secret: SecretType) throws - + /// Updates the name of a Secret in the store. + /// - Parameters: + /// - secret: The ``Secret`` to update. + /// - name: The new name for the Secret. func update(secret: SecretType, name: String) throws } diff --git a/Sources/Secretive.xcodeproj/project.pbxproj b/Sources/Secretive.xcodeproj/project.pbxproj index dd4c6d3..d66060b 100644 --- a/Sources/Secretive.xcodeproj/project.pbxproj +++ b/Sources/Secretive.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 2C4A9D2F2636FFD3008CC8E2 /* RenameSecretView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C4A9D2E2636FFD3008CC8E2 /* RenameSecretView.swift */; }; 50020BB024064869003D4025 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50020BAF24064869003D4025 /* AppDelegate.swift */; }; + 50033AC327813F1700253856 /* BundleIDs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50033AC227813F1700253856 /* BundleIDs.swift */; }; 5003EF3B278005E800DF2006 /* SecretKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5003EF3A278005E800DF2006 /* SecretKit */; }; 5003EF3D278005F300DF2006 /* Brief in Frameworks */ = {isa = PBXBuildFile; productRef = 5003EF3C278005F300DF2006 /* Brief */; }; 5003EF3F278005F300DF2006 /* SecretAgentKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5003EF3E278005F300DF2006 /* SecretAgentKit */; }; @@ -104,6 +105,7 @@ /* Begin PBXFileReference section */ 2C4A9D2E2636FFD3008CC8E2 /* RenameSecretView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RenameSecretView.swift; sourceTree = ""; }; 50020BAF24064869003D4025 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 50033AC227813F1700253856 /* BundleIDs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BundleIDs.swift; sourceTree = ""; }; 5003EF39278005C800DF2006 /* Packages */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Packages; sourceTree = ""; }; 50153E1F250AFCB200525160 /* UpdateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateView.swift; sourceTree = ""; }; 50153E21250DECA300525160 /* SecretListItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecretListItemView.swift; sourceTree = ""; }; @@ -181,6 +183,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 50033AC427813F1C00253856 /* Helpers */ = { + isa = PBXGroup; + children = ( + 50033AC227813F1700253856 /* BundleIDs.swift */, + ); + path = Helpers; + sourceTree = ""; + }; 50617D7623FCE48D0099B055 = { isa = PBXGroup; children = ( @@ -210,6 +220,7 @@ 50617D8223FCE48E0099B055 /* App.swift */, 508A58B0241ED1C40069DC07 /* Views */, 508A58B1241ED1EA0069DC07 /* Controllers */, + 50033AC427813F1C00253856 /* Helpers */, 50617D8623FCE48E0099B055 /* Assets.xcassets */, 50617D8E23FCE48E0099B055 /* Info.plist */, 508BF28D25B4F005009EFB7E /* InternetAccessPolicy.plist */, @@ -469,6 +480,7 @@ 5079BA0F250F29BF00EA86F4 /* StoreListView.swift in Sources */, 50617DD223FCEFA90099B055 /* PreviewStore.swift in Sources */, 5066A6F7251829B1004B5A36 /* ShellConfigurationController.swift in Sources */, + 50033AC327813F1700253856 /* BundleIDs.swift in Sources */, 508A58B3241ED2180069DC07 /* AgentStatusChecker.swift in Sources */, 50C385A52407A76D00AF2719 /* SecretDetailView.swift in Sources */, 5099A02423FD2AAA0062B6F2 /* CreateSecretView.swift in Sources */, diff --git a/Sources/Packages/Sources/SecretKit/BundleIDs.swift b/Sources/Secretive/Helpers/BundleIDs.swift similarity index 100% rename from Sources/Packages/Sources/SecretKit/BundleIDs.swift rename to Sources/Secretive/Helpers/BundleIDs.swift