예제 #1
0
파일: recover.py 프로젝트: Tubbz-alt/pkpass
 def _run_command_execution(self):
     """ Run function for class.                                      """
     ####################################################################
     print("If the password returned is not correct, you may need more shares")
     shares = input("Enter comma separated list of shares: ")
     shares = shares.split(",")
     shares = map(str.strip, shares)
     print(pk_recover_secret(shares))
예제 #2
0
 def test_split_secret_failure(self):
     """test recovery failure with not enough shares"""
     passwd = escrow.pk_recover_secret(self.shares[0:1])
     self.assertNotEqual(passwd, PASSWORD)
예제 #3
0
 def test_split_secret_min_shares(self):
     """test recovery with min shares functionality"""
     passwd = escrow.pk_recover_secret(self.shares[0:2])
     self.assertEqual(passwd, PASSWORD)
예제 #4
0
 def test_spliting_with_no_min(self):
     shares = escrow.pk_split_secret(PASSWORD, ["r1", "r2", "r3"], None)
     passwd = escrow.pk_recover_secret(shares)
     self.assertEqual(passwd, PASSWORD)
예제 #5
0
 def test_spliting_with_no_min(self):
     """Test SSSS without a minimum requirement"""
     shares = escrow.pk_split_secret(PASSWORD, ["r1", "r2", "r3"], None)
     passwd = escrow.pk_recover_secret(shares)
     self.assertEqual(passwd, PASSWORD)
예제 #6
0
파일: test_escrow.py 프로젝트: olcf/pkpass
 def test_split_secret_all_shares(self):
     """test recovery with all shares functionality"""
     passwd = pk_recover_secret(self.shares)
     self.assertEqual(passwd, PASSWORD)