diff options
author | siddharth <s@ricketyspace.net> | 2022-05-14 15:03:55 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2022-05-14 15:03:55 -0400 |
commit | 1df94973e5a9f76c01a614f4531837824a8f39b6 (patch) | |
tree | aad222bacf642dc756f9cd9ddebfc032bce8af3c | |
parent | 24bc976b0d06637a72b013f3443815bf4ef71bc1 (diff) |
lib: SRPUser: add news functions
To set and get unexoposed fields.
-rw-r--r-- | lib/srp.go | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 |