Exemple #1
0
 def set_password(self):
     """
     Encrypts node.password with salt and sha1.
     The password property must have been set previously (node.password = '******')
     """
     self.password = make_password('sha1', self.password)
     return self.password
Exemple #2
0
 def set_password(self):
     """
     Encrypts node.password with salt and sha1.
     The password property must have been set previously (node.password = '******')
     """
     self.password = make_password('sha1', self.password)
     return self.password
 def set_unusable_password(self):
     # Sets a value that will never be a valid hash
     self.password = make_password('sha1', None)
 def set_password(self, raw_password):
     self.password = make_password('sha1', raw_password)
Exemple #5
0
 def test_make_unusable(self):
     "Check that you can create an unusable password."
     password = utils.make_password("any", None)
     self.assertFalse(utils.is_password_usable(password))
     self.assertFalse(utils.check_password("foobar", password))
Exemple #6
0
 def _test_make_password(self, algo):
     password = utils.make_password(algo, "foobar")
     self.assertTrue(utils.is_password_usable(password))
     self.assertTrue(utils.check_password("foobar", password))
Exemple #7
0
 def set_unusable_password(self):
     # Sets a value that will never be a valid hash
     self.password = make_password('sha1', None)
Exemple #8
0
 def set_password(self, raw_password):
     self.password = make_password('sha1', raw_password)
Exemple #9
0
 def set_password(self, raw_password):
     self.password = make_password("sha1", raw_password)
Exemple #10
0
 def test_make_unusable(self):
     "Check that you can create an unusable password."
     password = utils.make_password("any", None)
     self.assertFalse(utils.is_password_usable(password))
     self.assertFalse(utils.check_password("foobar", password))
Exemple #11
0
 def _test_make_password(self, algo):
     password = utils.make_password(algo, "foobar")
     self.assertTrue(utils.is_password_usable(password))
     self.assertTrue(utils.check_password("foobar", password))