Lines Matching refs:method
40 for method in crypt.methods:
41 salt = crypt.mksalt(method)
42 self.assertIn(len(salt) - method.salt_chars, {0, 1, 3, 4, 6, 7})
43 if method.ident:
44 self.assertIn(method.ident, salt[:len(salt)-method.salt_chars])
47 for method in crypt.methods:
48 cr = crypt.crypt('assword', method)
49 self.assertEqual(len(cr), method.total_size)
52 cr = crypt.crypt('assword', crypt.mksalt(method))
53 self.assertEqual(len(cr), method.total_size)
70 for method in (crypt.METHOD_SHA256, crypt.METHOD_SHA512):
72 salt = crypt.mksalt(method, rounds=rounds)
74 self.assertEqual(len(salt) - method.salt_chars,
95 for method in (crypt.METHOD_SHA256, crypt.METHOD_SHA512,
98 crypt.mksalt(method, rounds='4096')
100 crypt.mksalt(method, rounds=4096.0)
103 crypt.mksalt(method, rounds=rounds)
106 for method in (crypt.METHOD_CRYPT, crypt.METHOD_MD5):
108 crypt.mksalt(method, rounds=4096)