示例#1
0
 def test_verify(self):
     key = Key(label='label', username='******', password='******')
     masterkey = MasterKey(password='******')
     enc = masterkey.encrypt_key(key=key)
     self.assertTrue(masterkey.verify(encrypted=enc))
示例#2
0
 def test_encdec_key(self):
     key = Key(label='label', username='******', password='******')
     masterkey = MasterKey(password='******')
     enc = masterkey.encrypt_key(key=key)
     dec = masterkey.decrypt_key(enc)
     self.assertEqual(key, dec)