Sqlite encryption mcrypt key


#1

Hello,

Using MCRYPT_RIJNDAEL_256 in php 5.6 you may encounter an issue with key length.
To resolve it add ./0 to your key:
Exemple:
$key = "123456";
Add :
$key = $key."/0";

Gilbert


#2

Thank you for the feedback!


#3

@Gilmichel I am struggling with finding solution for encrypting sqlite3 database. Do you have any links that may explain more about your methods?

Thanks in advance.

Susan


#4

Hello SuSan,

I am now using openssl.
if you tape the words, php openssl sample, in google search you will find a lot of information and samples about it.

Gilbert


#5

Good deal, thank you!

Got to educate myself on SQLite3 and PHP7+. Never used sqlite much in past so hitting the books : )


#6

Hello Susan,

Based on my experience, using SQLite3 to build desktop software doesn’t need to know PHP7+, no even PDO, it is only necessary to know how to use php SQLite3 as it is in its simple version.

Tutorial

Gilbert


#7

That is very true Gilbert. What I should have said was: got to learn php7.2 and openssl + sqlite.

Never used sqlite that much and when did used mcrypt. Nice thing about sqlite is fairly easy to grasp if used mysql.

In a school environment all such databases must be password protected or encrypted. I cannot even get software approved without one or the other: )

Thanks for the link to tutorial!


#8

Openssl is also working find with php 4, 5, and 6.