fix bug handling default "peanut"-encrypted encryptedKey

main
Paul Feitzinger 5 months ago
parent f7c733c2a1
commit 11d3aea0d4

@ -26,7 +26,7 @@ iv = b' ' * 16
def decrypt_encrypted_key(password, encrypted_key): def decrypt_encrypted_key(password, encrypted_key):
encrypted_key = bytes.fromhex(encrypted_key) encrypted_key = bytes.fromhex(encrypted_key)
if encrypted_key.startswith(b'v10'): if encrypted_key.startswith(b'v10'):
encrypted_key = b'peanuts' password = 'peanuts'
logger.warning(f'encryptedKey in config.json is encrypted using the default `peanuts` key') logger.warning(f'encryptedKey in config.json is encrypted using the default `peanuts` key')
elif encrypted_key.startswith(b'v11'): elif encrypted_key.startswith(b'v11'):
encrypted_key = encrypted_key[3:] encrypted_key = encrypted_key[3:]

Loading…
Cancel
Save