background image
<< encryptionKey=key attribute | failover=true attribute >>

encryptionAlgorithm=algorithm attribute

<< encryptionKey=key attribute | failover=true attribute >>
Derby Reference Manual
339
Specifies the provider for data encryption. For information about data encryption, see
"Encrypting databases on disk" in the Derby Developer's Guide.
If this attribute is not specified, the default encryption provider is the one included in the
JVM that you are using.
Combining with other attributes
The encryptionProvider attribute must be combined with the
bootPassword=key
and
dataEncryption=true
attributes. You can also specify the
encryptionAlgorithm=algorithm
attribute.
For an existing, unencrypted database for which authentication and SQL authorization
are both enabled, only the
database owner
can perform encryption or reencryption.
Please see "Enabling user authentication" and "Setting the SQL standard authorization
mode" in the Derby Developer's Guide for more information.
Examples
-- create a new, encrypted database
jdbc:derby:encryptedDB;create=true;dataEncryption=true;
encryptionProvider=com.sun.crypto.provider.SunJCE;
encryptionAlgorithm=DESede/CBC/NoPadding;
bootPassword=cLo4u922sc23aPe
-- configure an existing database for encryption
jdbc:derby:salesdb;dataEncryption=true;
encryptionProvider=com.sun.crypto.provider.SunJCE;
encryptionAlgorithm=DESede/CBC/NoPadding;
bootPassword=cLo4u922sc23aPe
encryptionAlgorithm=algorithm attribute
Function
Specifies the algorithm for data encryption.
Use the Java conventions when you specify the algorithm, for example:
algorithmName/feedbackMode/padding
The only padding type that is allowed with Derby is NoPadding.
If no encryption algorithm is specified, the default value is DES/CBC/NoPadding.
For information about data encryption, see "Encrypting databases on disk" in the Derby
Developer's Guide
.
Combining with other attributes
The encryptionAlgorithm attribute must be combined with the
bootPassword=key
attribute and the
dataEncryption=true
attribute. You have the option of also specifying
the
encryptionProvider=providerName
attribute to specify the encryption provider of the
algorithm.
For an existing database for which authentication and SQL authorization are both
enabled, only the
database owner
can perform encryption or reencryption. Please see
"Enabling user authentication" and "Setting the SQL standard authorization mode" in the
Derby Developer's Guide for more information.
Examples
-- encrypt a new database
jdbc:derby:encryptedDB;create=true;dataEncryption=true;
encryptionProvider=com.sun.crypto.provider.SunJCE;
encryptionAlgorithm=DESede/CBC/NoPadding;