bssthu / pysqlsimplecipher

encrypt or decrypt sqlcipher's sqlite db.
GNU Lesser General Public License v3.0
37 stars 11 forks source link

RuntimeError: failed to decide page size or reserve size #1

Open galaris opened 7 years ago

galaris commented 7 years ago

Keep getting the following error on trying to decrypt a db:

c:\Python27>decrypt.py encrypted.db password123 out.db
Traceback (most recent call last):
  File "C:\Python27\decrypt.py", line 33, in <module>
    main()
  File "C:\Python27\decrypt.py", line 29, in main
    decryptor.decrypt_file(filename_in, password, filename_out)
  File "C:\Python27\pysqlsimplecipher\decryptor.py", line 28, in decrypt_file
    dec = decrypt_default(raw, password)
  File "C:\Python27\pysqlsimplecipher\decryptor.py", line 47, in decrypt_default

    return decrypt(raw, password, salt_mask, key_sz, key_iter, hmac_key_sz, hmac
_key_iter, page_sz, iv_sz, reserve_sz, hmac_sz)
  File "C:\Python27\pysqlsimplecipher\decryptor.py", line 61, in decrypt
    raise RuntimeError('failed to decide page size or reserve size.')
**RuntimeError: failed to decide page size or reserve size.**

Tried on multiple installations, both 32 and 64bit of Windows 7

Danbardo commented 6 years ago

I am having the same problem.

I just decrypted the database using SqliteStudio, it was really easy

nHunter0 commented 9 months ago

I had the same error and after some troubleshooting, I realized it was due to an incorrect password. Once I corrected the password, everything worked fine. Make sure to double-check your password!