def _check_userline(self, user, password, suffix): return suffix == htpasswd(password, suffix)
def adduser(self, user): """Add a user to the environment. Password is the username.""" f = open(self.htpasswd, 'a') f.write("%s:%s\n" % (user, htpasswd(user))) f.close()
def check(password, hashed): """check callback for AccountManager's htpasswd""" return hashed == htpasswd(password, hashed)