From 6e45b3e5976f3f8387058c33b444f1b9d39537d8 Mon Sep 17 00:00:00 2001 From: Marius Seufzer <44228394+marius-se@users.noreply.github.com> Date: Thu, 27 May 2021 12:43:17 +0200 Subject: [PATCH] Add public initializer to SRPKeyPair (#7) * Add public initializer to SRPKeyPair * Add documentation to the SRPKeyPair public initializer --- Sources/SRP/keys.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sources/SRP/keys.swift b/Sources/SRP/keys.swift index 999562b..c7d08a0 100644 --- a/Sources/SRP/keys.swift +++ b/Sources/SRP/keys.swift @@ -22,9 +22,19 @@ public struct SRPKey { extension SRPKey: Equatable { } -/// contains a private and a public key +/// Contains a private and a public key public struct SRPKeyPair { public let `public`: SRPKey public let `private`: SRPKey + + + /// Initialise a SRPKeyPair object + /// - Parameters: + /// - public: The public key of the key pair + /// - private: The private key of the key pair + public init(`public`: SRPKey, `private`: SRPKey) { + self.private = `private` + self.public = `public` + } }