コード例 #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))
コード例 #2
0
ファイル: test_crypt.py プロジェクト: Juniper/OpenClos
 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))
コード例 #3
0
 def testInitDefaultValue(self):
     cryptic = Cryptic()
     self.assertEqual('abcd1234',
                      cryptic.decrypt(cryptic.encrypt('abcd1234')))
コード例 #4
0
ファイル: test_crypt.py プロジェクト: Juniper/OpenClos
 def testInitDefaultValue(self):
     cryptic = Cryptic()
     self.assertEqual('abcd1234', cryptic.decrypt(cryptic.encrypt('abcd1234')))
コード例 #5
0
ファイル: test_crypt.py プロジェクト: codyrat/OpenClos
 def testInitDefaultValue(self):
     cryptic = Cryptic()
     self.assertEqual('Embe1mpls', cryptic.decrypt(cryptic.encrypt('Embe1mpls')))