000023616 - Crypto-J: how to get the transformation name from an algorithm OID

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 Number000023616
Applies ToRSA BSAFE Crypto-J 3.5.3
IssueCrypto-J: how to get the transformation name from an algorithm OID
Given an OID (i.e. 1.2.840.113549.1.1.5), how could one get back the name of the algorithm (i.e. "SHA1/RSA/PKCS1Block01Pad")?
Resolution

First of all, the OID would need to be formatted in a byte array, then just use the following call to get the mapping:

String transformationName = AlgorithmID.berDecodeAlgID(OID, 0, OIDList.UNKNOWN_OID, null);

Legacy Article IDa34801

Attachments

    Outcomes