mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2024-12-27 19:47:40 +06:00
Fix key import sometimes generating corrupted keys.
Should fix #145, #134, #119, #116, #115, #109 and maybe others.
This commit is contained in:
parent
21281baf21
commit
2d4c5d2c4b
@ -1152,7 +1152,8 @@ class AddAdeptDialog():
|
|||||||
zip_function = zip
|
zip_function = zip
|
||||||
|
|
||||||
for key, name in zip_function(defaultkeys, defaultnames):
|
for key, name in zip_function(defaultkeys, defaultnames):
|
||||||
if codecs.encode(key,'hex').decode("latin-1") in self.parent.plugin_keys.values():
|
key = codecs.encode(key,'hex').decode("latin-1")
|
||||||
|
if key in self.parent.plugin_keys.values():
|
||||||
print("Found key '{0}' in ADE - already present, skipping.".format(name))
|
print("Found key '{0}' in ADE - already present, skipping.".format(name))
|
||||||
else:
|
else:
|
||||||
self.new_keys.append(key)
|
self.new_keys.append(key)
|
||||||
@ -1167,8 +1168,8 @@ class AddAdeptDialog():
|
|||||||
key, name = checkForDeACSMkeys()
|
key, name = checkForDeACSMkeys()
|
||||||
|
|
||||||
if key is not None:
|
if key is not None:
|
||||||
|
key = codecs.encode(key,'hex').decode("latin-1")
|
||||||
if codecs.encode(key,'hex').decode("latin-1") in self.parent.plugin_keys.values():
|
if key in self.parent.plugin_keys.values():
|
||||||
print("Found key '{0}' in DeACSM - already present, skipping.".format(name))
|
print("Found key '{0}' in DeACSM - already present, skipping.".format(name))
|
||||||
else:
|
else:
|
||||||
# Found new key, add that.
|
# Found new key, add that.
|
||||||
@ -1202,7 +1203,7 @@ class AddAdeptDialog():
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def key_value(self):
|
def key_value(self):
|
||||||
return codecs.encode(self.new_keys[0],'hex').decode("utf-8")
|
return codecs.encode(self.new_keys[0],'hex').decode("latin-1")
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user