Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def add_user(self, username, password):
     s, v = srp.gen_sv(username, password)
     self.add_user_sv_hex(username, hex(s), hex(v))
Exemplo n.º 4
0
 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()
Exemplo n.º 5
0
 def add_user(self, username, password):
     self.db[username] = srp.gen_sv(username, password)
     self.write_db()