ChangeFileEncryption

A tools to change, remove or set a file password of a database without opening it. The encryption algorithm can be changed as well. It can not be used to change a password of a user.

Methods
static void execute(String dir, String db, String cipher, char[] decryptPassword, char[] encryptPassword, boolean quiet)
Changes the password for a database.
static void main(String[] args)
The command line interface for this tool.
void run(String[] args)

static void execute(String dir, String db, String cipher, char[] decryptPassword, char[] encryptPassword, boolean quiet) throws SQLException

Changes the password for a database. The passwords must be supplied as char arrays and are cleaned in this method.

Parameters:
dir - the directory (. for the current directory)
db - the database name (null for all databases)
cipher - the cipher (AES, XTEA)
decryptPassword - the decryption password as a char array
encryptPassword - the encryption password as a char array
quiet - don't print progress information
Throws:
SQLException

static void main(String[] args) throws SQLException

The command line interface for this tool. The options must be split into strings like this: "-db", "test",... Options are case sensitive. The following options are supported:
  • -help or -? (print the list of options)
  • -dir database directory (the default is the current directory)
  • -db database name (all databases if no name is specified)
  • -cipher type (AES or XTEA)
  • -decrypt password (null if the database is not encrypted)
  • -encrypt password (null if the database should not be encrypted)
  • -quiet does not print progress information


Parameters:
args - the command line arguments
Throws:
SQLException

void run(String[] args) throws SQLException