Package net.jsign

Enum DigestAlgorithm

    • Method Detail

      • values

        public static DigestAlgorithm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DigestAlgorithm c : DigestAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DigestAlgorithm valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • of

        public static DigestAlgorithm of​(String name)
        Parse the specified value and returns the corresponding digest algorithm. This method is more permissive than valueOf(String), it's case insensitive and ignores hyphens.
        Parameters:
        name - the name of the digest algorithm
        Returns:
        the digest algorithm, or null if the name specified doesn't match any supported algorithm
      • of

        public static DigestAlgorithm of​(ASN1ObjectIdentifier oid)
        Return the algorithm matching the specified object identifier.
        Parameters:
        oid - the ASN.1 object identifier of the algorithm
        Returns:
        the digest algorithm, or null if none matches the specified oid
      • getMessageDigest

        public MessageDigest getMessageDigest()
        Return a MessageDigest for this algorithm.
        Returns:
        a MessageDigest for this algorithm