def add_host(self, hostname, host_password): import srp s,v = srp.gen_sv( hostname, host_password ) return self.peer.callRemote('add_host', hostname, hex(s), hex(v))
def add_admin(self, admin_name, admin_password, permission_set = []): import srp s,v = srp.gen_sv( admin_name, admin_password ) return self.peer.callRemote('add_admin', admin_name, hex(s), hex(v), permission_set)
def add_user(self, username, password): s, v = srp.gen_sv(username, password) self.add_user_sv_hex(username, hex(s), hex(v))
def change_password(self, username, password): s, v = srp.gen_sv(username, password) self.c.execute("update users set salt=?, verifier=? where username=?", (hex(s), hex(v), username)) self.conn.commit()
def add_user(self, username, password): self.db[username] = srp.gen_sv(username, password) self.write_db()