000026170 - How to determine version of RSA BSAFE Crypto-J library

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000026170
Applies ToRSA BSAFE Crypto-J
IssueHow 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.
ResolutionRSA 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.:

Implementation-Version: 4.1

Specification-Version: 4.1
Legacy Article IDa22345

Attachments

    Outcomes