Enum MessageDigestAlgorithm

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEFAULT  
      MD2  
      MD5  
      SHA_1  
      SHA_224  
      SHA_256  
      SHA_384  
      SHA_512  
      SHA1
      Deprecated.
      You should really consider using SHA_1 instead except if you really need to be compatible with some old frameworks (e.g., Eclipse Equinox 3.7 / Indigo)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<java.lang.String> aliases  
      private java.lang.String standardName  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MessageDigestAlgorithm​(java.lang.String standardName, java.lang.String... alias)  
    • Field Detail

      • standardName

        private final java.lang.String standardName
      • aliases

        private final java.util.Set<java.lang.String> aliases
    • Constructor Detail

      • MessageDigestAlgorithm

        private MessageDigestAlgorithm​(java.lang.String standardName,
                                       java.lang.String... alias)
    • Method Detail

      • values

        public static MessageDigestAlgorithm[] 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 (MessageDigestAlgorithm c : MessageDigestAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MessageDigestAlgorithm valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • standardName

        public java.lang.String standardName()
        Returns the standard name of the MessageDigest algorithm as specified in the document " standard names for algorithms"
        Returns:
        the standard name of the algorithm.
      • fromStandardName

        public static MessageDigestAlgorithm fromStandardName​(java.lang.String digestAlgorithmName)