Class SignatureMechanisms

java.lang.Object
com.itextpdf.signatures.SignatureMechanisms

public class SignatureMechanisms extends Object
Class that contains OID mappings to extract a signature algorithm name from a signature mechanism OID, and conversely, to retrieve the appropriate signature mechanism OID given a signature algorithm and a digest function.
  • Constructor Details

    • SignatureMechanisms

      public SignatureMechanisms()
  • Method Details

    • getSignatureMechanismOid

      public static String getSignatureMechanismOid (String signatureAlgorithmName, String digestAlgorithmName)
      Attempt to look up the most specific OID for a given signature-digest combination.
      Parameters:
      signatureAlgorithmName - the name of the signature algorithm
      digestAlgorithmName - the name of the digest algorithm, if any
      Returns:
      an OID string, or null if none was found.
    • getAlgorithm

      public static String getAlgorithm (String oid)
      Gets the algorithm name for a certain id.
      Parameters:
      oid - an id (for instance "1.2.840.113549.1.1.1")
      Returns:
      an algorithm name (for instance "RSA")
    • getMechanism

      public static String getMechanism (String oid, String digest)
      Get the signing mechanism name for a certain id and digest.
      Parameters:
      oid - an id of an algorithm
      digest - digest of an algorithm
      Returns:
      name of the mechanism