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