Beispiel #1
0
 def test_make_intermediate(self):
     self.assertEqual(alg.make_intermediate("1234"),
         "$2y$10$w1dpoPu1duVEV4rnZPAkLe8kxqbSe4xmE4jVqL4IcwVLWluqZNI3G")
     self.assertEqual(alg.make_intermediate("super secret"),
         "$2y$10$w1dpoPu1duVEV4rnZPAkLea0PzJXKXtAHtHZ60MWk6pk1GH1uKpSe")
     self.assertEqual(alg.make_intermediate("blowfish"),
         "$2y$10$w1dpoPu1duVEV4rnZPAkLefQ9jBvhg/MM6m/oTFbWLBq0R0bhwiVW")
Beispiel #2
0
 def test_make_intermediate(self):
     self.assertEqual(
         alg.make_intermediate("1234"),
         "$2y$10$w1dpoPu1duVEV4rnZPAkLe8kxqbSe4xmE4jVqL4IcwVLWluqZNI3G")
     self.assertEqual(
         alg.make_intermediate("super secret"),
         "$2y$10$w1dpoPu1duVEV4rnZPAkLea0PzJXKXtAHtHZ60MWk6pk1GH1uKpSe")
     self.assertEqual(
         alg.make_intermediate("blowfish"),
         "$2y$10$w1dpoPu1duVEV4rnZPAkLefQ9jBvhg/MM6m/oTFbWLBq0R0bhwiVW")
Beispiel #3
0
def use_master(master_plaintext, use_bcrypt=False):
    global session_master
    global session_intermediate
    session_master = master_plaintext
    if use_bcrypt:
        session_intermediate = alg.make_intermediate(session_master)
    else:
        session_intermediate = session_master
Beispiel #4
0
def use_master(master_plaintext, use_bcrypt=False):
    global session_master
    global session_intermediate
    session_master = master_plaintext
    if use_bcrypt:
        session_intermediate = alg.make_intermediate(session_master)
    else:
        session_intermediate = session_master
Beispiel #5
0
 def test_make_intermediate_too_long(self):
     with self.assertRaises(Exception):
         alg.make_intermediate("x" * 73)
Beispiel #6
0
 def test_make_intermediate_too_long(self):
     with self.assertRaises(Exception):
         alg.make_intermediate("x" * 73)