Registered Member
|
I need disable encryption when save skrooge file.
I have a process using PHP and i need append records automatically in .skg file and i need read some records from this file too. I have looked in settings but i can find something as "disable encryption" checkbox. I removed password but the output file is using sqlcipher but i need direct sqlite db access. |
Moderator
|
Hi,
For security reason, Skrooge 2.x uses sqlcipher instead sqlite. It means that documents are always encrypted. Moreover, the skg file is not directly a sqlcipher file, this is sqlcipher file with a special header. If you want to develop an automatic treatment in PHP, you have to: 1- Copy the skg document and remove the header (The 15 first characters). 2- Use SQLCIPHER for PHP: https://www.zetetic.net/sqlcipher/sqlcipher-for-php/. 3- Use you password to open the document, if no password set, then the password is "DEFAULTPASSWORD". 4- Do the modifications. 5- Don't forget to add the header to the file. I hope this will help you. |
Registered Member
|
Thanks for your answer.
I have installed sqlcipher in PHP but i can't connect to database. I think that the signature length in skg files is 18 (SKROOGE_ENCRYPTE2-) not 15 so i am doing:
I have done the tests: - Using length from 15 to 18 - Save skrooge file with empty password and with 'abc' as password. And i get the same error. I tested with SQLiteBrowser with SQLCipher support and i get 'Invalid format' error. I understand security reasons for to encrypt files, but i think that the user must be able to select if encrypt or not their files. I like Skrooge (i come from KMyMoney) but i can't use it now if i am not able to integrate with my webapp. Thanks for your work. |
Moderator
|
Oups, I forgot: there is a double encryption, so the process is more complex.
But, you can apply it easy by using skroogeconvert like this:
Then you just have to establish the connection with the sqlite database named file.sqlite. I hope this will help you. |
Registered Member
|
Yes, i know about double encryption. I was looking in skrooge source code.
skroogeconvert could not convert the files:
Export mode seems not implemented yet The notice in first line may seem interesting to you. After reading all your code, mainly SKGDocument and SKGServices, i was able to open skrooge file using this code (list all tables in skg file):
Result:
I put the code here because somebody may need it. Regards. |
Moderator
|
Try this:
The extension of the file is important to know what kind of conversion is requested. |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]