Skip to content

Commit

Permalink
Add public initializer to SRPKeyPair (#7)
Browse files Browse the repository at this point in the history
* Add public initializer to SRPKeyPair
* Add documentation to the SRPKeyPair public initializer
  • Loading branch information
marius-se authored May 27, 2021
1 parent 112b72c commit 6e45b3e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Sources/SRP/keys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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`
}
}

0 comments on commit 6e45b3e

Please sign in to comment.