Skip to content

Commit 6e45b3e

Browse files
authored
Add public initializer to SRPKeyPair (#7)
* Add public initializer to SRPKeyPair * Add documentation to the SRPKeyPair public initializer
1 parent 112b72c commit 6e45b3e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Sources/SRP/keys.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,19 @@ public struct SRPKey {
2222

2323
extension SRPKey: Equatable { }
2424

25-
/// contains a private and a public key
25+
/// Contains a private and a public key
2626
public struct SRPKeyPair {
2727
public let `public`: SRPKey
2828
public let `private`: SRPKey
29+
30+
31+
/// Initialise a SRPKeyPair object
32+
/// - Parameters:
33+
/// - public: The public key of the key pair
34+
/// - private: The private key of the key pair
35+
public init(`public`: SRPKey, `private`: SRPKey) {
36+
self.private = `private`
37+
self.public = `public`
38+
}
2939
}
3040

0 commit comments

Comments
 (0)