Esempio n. 1
0
 def testHashPassword(self):
     cryptic = Cryptic()
     hash_text = cryptic.hashify('abcd1234')
     self.assertEqual(True,
                      cryptic.authenticate_hash('abcd1234', hash_text))
     hash_text = cryptic.hashify('Juniper123')
     self.assertEqual(True,
                      cryptic.authenticate_hash('Juniper123', hash_text))
     hash_text = cryptic.hashify('abcd1234')
     self.assertEqual(False,
                      cryptic.authenticate_hash('Juniper123', hash_text))
Esempio n. 2
0
 def testHashPassword(self):
     cryptic = Cryptic()
     hash_text = cryptic.hashify ('abcd1234')
     self.assertEqual(True, cryptic.authenticate_hash('abcd1234', hash_text))
     hash_text = cryptic.hashify ('Juniper123')
     self.assertEqual(True, cryptic.authenticate_hash('Juniper123', hash_text))
     hash_text = cryptic.hashify ('abcd1234')
     self.assertEqual(False, cryptic.authenticate_hash('Juniper123', hash_text))
Esempio n. 3
0
 def testInitDefaultValue(self):
     cryptic = Cryptic()
     self.assertEqual('abcd1234',
                      cryptic.decrypt(cryptic.encrypt('abcd1234')))
Esempio n. 4
0
 def testInitDefaultValue(self):
     cryptic = Cryptic()
     self.assertEqual('abcd1234', cryptic.decrypt(cryptic.encrypt('abcd1234')))
Esempio n. 5
0
 def testInitDefaultValue(self):
     cryptic = Cryptic()
     self.assertEqual('Embe1mpls', cryptic.decrypt(cryptic.encrypt('Embe1mpls')))