mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-03 23:15:33 +00:00
komrade update!
This commit is contained in:
parent
3207d5648c
commit
dde300c7ad
@ -227,12 +227,13 @@ KEYMAKER_DEFAULT_KEY_TYPES = {
|
||||
|
||||
|
||||
def get_key_obj(keyname,data,key_types=KEYMAKER_DEFAULT_KEY_TYPES):
|
||||
if keyname.endswith('_decr'):
|
||||
try:
|
||||
data_s = data.decode()
|
||||
if data_s == KomradeSymmetricKeyWithPassphrase.__name__:
|
||||
if data_s == KEY_TYPE_SYMMETRIC_WITH_PASSPHRASE:
|
||||
return KomradeSymmetricKeyWithPassphrase()
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
return KomradeSymmetricKeyWithoutPassphrase(data)
|
||||
|
||||
return key_types[keyname](data)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user