Example #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))
Example #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)