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
      • getScheme

        public static String getScheme​(String alg)
        Return the scheme associated with the provided algorithm (e.g. SHA-1 returns urn:sha1)
        Parameters:
        alg - for which scheme is requested
        Returns:
        scheme
      • fromScheme

        public static DigestAlgorithm fromScheme​(String argScheme)
        Return enum value for the provided scheme (e.g. urn:sha1 returns SHA-1)
        Parameters:
        argScheme - for which enum is requested
        Returns:
        enum value associated with the arg scheme
      • fromAlgorithm

        public static DigestAlgorithm fromAlgorithm​(String alg)
        Return enum value for the provided algorithm
        Parameters:
        alg - algorithm name to seek
        Returns:
        enum value associated with the algorithm name, or missing if not found
      • isSupportedAlgorithm

        public static boolean isSupportedAlgorithm​(String alg)
        Return true if the provided algorithm is included in this enum
        Parameters:
        alg - to test
        Returns:
        true if arg algorithm is supported