|Applies To||RSA BSAFE Crypto-J|
|Issue||How to determine version of RSA BSAFE Crypto-J library|
When more than one RSA BSAFE Crypto-J library (JSafe) is available, it may be necessary to compare results or features. For development reasons, it maybe best to have the application display which library was used to create the class file.
|Resolution||RSA BSAFE Crypto-J includes a static integer CryptoJ.CRYPTO_J_VERSION which contains the version number. The following is an example that displays the version of Crypto-J used:|
System.out.println("CryptoJ Version is " + CryptoJ.CRYPTO_J_VERSION);
NOTE: As this is a static variable, it will be included at compile time. This means it will only confirm the library used to compile the class and not the one used at runtime.
To determine the version, you can call CryptoJVersion.getProductID()), which is shown in the sample program cryptoj/sample/src/jsafe/misc/VersionPrinter.java. You can run this sample by running "ant run.VersionPrinter" from the cryptoj directory.
You may also view the version number in the Crypto-J jar file, in the META-INF\MANIFEST.MF file, e.g.:
|Legacy Article ID||a22345|