Encrypting a database when you create it

If your environment is configured properly, you can create your database as an encrypted database (one in which the database is encrypted on disk). To do this, you use the dataEncryption=true attribute to turn on encryption and the bootPassword=key attribute to specify a key for the encryption. You can also specify an encryption provider and encryption algorithm other than the defaults with the encryptionProvider=providerName and encryptionAlgorithm=algorithm attributes For more information about data encryption, see Encrypting databases on disk.

jdbc:derby:encryptedDB;create=true;dataEncryption=true;
bootPassword=DBpassword
Related tasks
Shutting down Derby or an individual database
Creating and accessing a database
Providing a user name and password
Booting an encrypted database
Specifying attributes in a properties object
Related reference
Using the databaseName attribute