From 1df94973e5a9f76c01a614f4531837824a8f39b6 Mon Sep 17 00:00:00 2001 From: siddharth Date: Sat, 14 May 2022 15:03:55 -0400 Subject: lib: SRPUser: add news functions To set and get unexoposed fields. --- lib/srp.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- cgit v1.2.3