Exemple #1
0
 def test_nthash(self):
     for secret, hash in [
         ("OLDPASSWORD", u"6677b2c394311355b54f25eec5bfacf5"),
         ("NEWPASSWORD", u"256781a62031289d3c2c98c14f1efc8c"),
     ]:
         result = mod.raw_nthash(secret, hex=True)
         self.assertEqual(result, hash)
 def test_nthash(self):
     for secret, hash in [
         ("OLDPASSWORD", u"6677b2c394311355b54f25eec5bfacf5"),
         ("NEWPASSWORD", u"256781a62031289d3c2c98c14f1efc8c"),
         ]:
         result = mod.raw_nthash(secret, hex=True)
         self.assertEqual(result, hash)
Exemple #3
0
 def test_nthash(self):
     warnings.filterwarnings("ignore",
                             r"nthash\.raw_nthash\(\) is deprecated")
     from passlib.win32 import raw_nthash
     for secret, hash in [
         ("OLDPASSWORD", u("6677b2c394311355b54f25eec5bfacf5")),
         ("NEWPASSWORD", u("256781a62031289d3c2c98c14f1efc8c")),
     ]:
         result = raw_nthash(secret, hex=True)
         self.assertEqual(result, hash)
 def test_nthash(self):
     warnings.filterwarnings("ignore",
                             r"nthash\.raw_nthash\(\) is deprecated")
     from passlib.win32 import raw_nthash
     for secret, hash in [
         ("OLDPASSWORD", u("6677b2c394311355b54f25eec5bfacf5")),
         ("NEWPASSWORD", u("256781a62031289d3c2c98c14f1efc8c")),
         ]:
         result = raw_nthash(secret, hex=True)
         self.assertEqual(result, hash)