Ejemplo n.º 1
0
        def test_challenges_py_to_native(self):
            for authkey in authkeys:
                generated_challenge = generate_challenge(authkey['public'])
                answer = cube2crypto.answerchallenge(
                    authkey['private'], str(generated_challenge[0]))

                self.assertEqual(str(generated_challenge[1]), answer)
Ejemplo n.º 2
0
 def test_challenges(self):
     for authkey in authkeys:
         generated_challenge = cube2crypto.genchallenge(authkey['public'], authkey['pwd'])
         answer = cube2crypto.answerchallenge(authkey['private'], generated_challenge[0])
         
         self.assertEqual(generated_challenge[1], answer)
Ejemplo n.º 3
0
 def test_challenges_py_to_native(self):
     for authkey in authkeys:
         generated_challenge = generate_challenge(authkey['public'])
         answer = cube2crypto.answerchallenge(authkey['private'], generated_challenge[0])
         
         self.assertEqual(generated_challenge[1], answer)