summaryrefslogtreecommitdiffstats
path: root/lib/srp.go
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2022-05-14 15:03:55 -0400
committersiddharth <s@ricketyspace.net>2022-05-14 15:03:55 -0400
commit1df94973e5a9f76c01a614f4531837824a8f39b6 (patch)
treeaad222bacf642dc756f9cd9ddebfc032bce8af3c /lib/srp.go
parent24bc976b0d06637a72b013f3443815bf4ef71bc1 (diff)
lib: SRPUser: add news functions
To set and get unexoposed fields.
Diffstat (limited to 'lib/srp.go')
-rw-r--r--lib/srp.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/srp.go b/lib/srp.go
index f6773d0..ee0b1df 100644
--- a/lib/srp.go
+++ b/lib/srp.go
@@ -250,6 +250,22 @@ func (u *SRPUser) SessionKeyMacVerify(mac []byte) bool {
return u.h.MacVerify(u.salt, u.sk, mac)
}
+func (u *SRPUser) LoggedIn() bool {
+ return u.loggedIn
+}
+
+func (u *SRPUser) LogIn() {
+ u.loggedIn = true
+}
+
+func (u *SRPUser) LogOut() {
+ u.loggedIn = false
+}
+
+func (u *SRPUser) Salt() []byte {
+ return u.salt
+}
+
func NewSRPClientSession(n, g, k, ident string) (*SRPClientSession, error) {
var ok bool