Hi!
In a Java programm I am importing a database from a script into an
unencrypted file. Next I want to encrypt it using the ChangeFileEncryption
class:
public static void main(String[] args) throws Exception {
> org.h2.Driver.load();
>
> try (Connection conn =
> DriverManager.getConnection("jdbc:h2:D:/temp/database", "sa", "");
> Statement stmt = conn.createStatement()) {
> stmt.execute("RUNSCRIPT FROM 'D:/temp/db.ddl'");
> }
>
> ChangeFileEncryption.execute("D:/temp/", "database", "AES", null,
> "a".toCharArray(), true);
>
> Connection conn =
> DriverManager.getConnection("jdbc:h2:D:/temp/database;CIPHER=AES", "sa", "
> a");
> System.out.println(conn);
>
> }
>
This throws a "Encryption error in file "D:/TEMP/database.h2.db"
[90049-174]". What is wrong here? According to the source code of
ChangeFileEncryptionit should be possible to encrypt an unencrypted file
(setting key=null). How can I solve this problem?
Regards
Thomas
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.