HSQLDB + encrypt .script file
Dear all,
When I use HSQLDB as an integrated database, it will create a <name>.properties and a <name>.script file. As you all know, the .script file contains the entire databasein plain text. I've searched for it for a long time, but I can't find any solution to encrypt this file whatever. The database is accessible without any restrictions. Therefor I have 2 questions:
1 - Is it possible to encrypt the .script file? (I will store usernames / passwords in it and I don't want anyone to manually f*ck up the database)
2 - Is it possible to change the default "SA" / "" username / password with one of your own?
Tx in advance,
Peter
# 1
Okay, I think I found the solution. I will write it down for other people that are interested.
When you create your database, execute this statement to the database:
SET SCRIPTFORMAT BINARY
(BINARY can also be COMPRESSED or TEXT)
This way you "encrypt" your database into binary data. With the command "SET PASSWORD myp@ssword" you can change your password (default password is an empty String). So this way your database is password protected in a good way.
I'm not sure, but I do not think this way your database 100% proof. You can probably write a program to read the (binary) database and then export it as default text. But this is a way to prevent simple users from looking / changing directly into the database (which you really don't want if you have passwords stored in it).
So if anyone has other solutions to REALLY encrypt it, feel free to post.