2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-05 21:20:51 +00:00
This commit is contained in:
quadrismegistus 2020-09-12 16:34:08 +01:00
parent 6cecc48e09
commit 5bc39be841

View File

@ -39,11 +39,14 @@ class KomradeSymmetricKey(KomradeKey):
def encrypt(self,msg,**kwargs):
if issubclass(type(msg), KomradeKey) or issubclass(type(msg),KomradeEncryptedKey):
msg=msg.data
print('??? dec',msg,kwargs)
return self.cell.encrypt(msg,**kwargs)
def decrypt(self,msg,**kwargs):
print('??? dec',msg,kwargs)
if issubclass(type(msg), KomradeKey) or issubclass(type(msg),KomradeEncryptedKey):
msg=msg.data
print('??? dec',msg,kwargs)
try:
return self.cell.decrypt(msg,**kwargs)
except TypeError: