The default encryption plug‑in provides classes that can be used to generate different encryption keys. The classes names are SymmetricKeyGenerator and PublicKeyPairGenerator. SymmetricKeyGenerator generates private keys, which are also known as symmetric keys. PublicKeyPairGenerator generates public keys. Both classes require acdefaultsecurity.jar in the classpath.
Both classes take two parameters, the encryption algorithm and the output file, where the generated encrypted key is written. The encryption algorithm is a required parameter. The output file is an optional parameter. If you do not provide the second parameter, the output file is named key.properties and is saved in the current folder. The encryption algorithm values are shown in Table 44‑4.
1 To navigate to the default security folder, open a command prompt window and navigate to the default security plugin directory using a command similar to the following:
cd C:\Program Files\BRDPro\eclipse\plugins\com.actuate.birt.model.defaultsecurity_<Release>
2 To generate the key, as shown in Figure 44‑2, type:
java -cp acdefaultsecurity.jar com.actuate.birt.model.defaultsecurity.api.keygenerator.SymmetricKeyGenerator des
Figure 44‑2 Symmetric key generation
3 The generated key is saved in the file, key.properties. The content of the file looks like this one:
#Key Generator
#Fri Dec 20 12:03:03 PST 2013
symmetric-key=fbbf1f91028...
4 Copy the key from the generated key file to the encryption.properties file.
How to generate a public key using RSA encryption
Run the main function of PublicKeyPairGenerator.
1 To navigate to the default security folder, open a command prompt window and navigate to the default security plugin directory using a command similar to the following:
cd C:\Program Files\BRDPro\eclipse\plugins\com.actuate.birt.model.defaultsecurity_<Release>