Class CryptoUtilXML


  • public final class CryptoUtilXML
    extends java.lang.Object

    Utility class contains encryption and hash functions for digital signature.

    Project:

    Library for the integration with the services of @Firma, eVisor and TS@.

    Version:
    1.3, 04/03/2020.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.bouncycastle.asn1.tsp.MessageImprint generateMessageImprintFromXMLAlgorithm​(java.lang.String hashAlgXML, byte[] data)
      Method that obtains the MessageImprint from the digest method algorithm URI.
      static java.lang.String translateAlgorithmIdentifier​(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
      Method that translates a AlgorithmIdentifier object to a digest algorithm string.
      static java.lang.String translateDigestAlgorithmToXMLURI​(java.lang.String alg)
      Method that translates a URI object to a algorithm string.
      static java.lang.String translateXmlDigestAlgorithm​(java.lang.String digestAlg)
      Method that translates a AlgorithmIdentifier object to a digest algorithm string.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • translateAlgorithmIdentifier

        public static java.lang.String translateAlgorithmIdentifier​(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier)
        Method that translates a AlgorithmIdentifier object to a digest algorithm string.
        Parameters:
        algorithmIdentifier - Parameter that represents the OID of the digest algorithm.
        Returns:
        the digest algorithm name.
      • translateXmlDigestAlgorithm

        public static java.lang.String translateXmlDigestAlgorithm​(java.lang.String digestAlg)
        Method that translates a AlgorithmIdentifier object to a digest algorithm string.
        Parameters:
        digestAlg - Parameter that represents the digest method algorithm URI.
        Returns:
        the digest algorithm name.
      • generateMessageImprintFromXMLAlgorithm

        public static org.bouncycastle.asn1.tsp.MessageImprint generateMessageImprintFromXMLAlgorithm​(java.lang.String hashAlgXML,
                                                                                                      byte[] data)
        Method that obtains the MessageImprint from the digest method algorithm URI.
        Parameters:
        hashAlgXML - Parameter that represents the digest method algorithm URI.
        data - Parameter that represents the hashed message.
        Returns:
        the generated MessageImprint.
      • translateDigestAlgorithmToXMLURI

        public static java.lang.String translateDigestAlgorithmToXMLURI​(java.lang.String alg)
        Method that translates a URI object to a algorithm string.
        Parameters:
        alg - Parameter that represents the method algorithm.
        Returns:
        the algorithm name.