Enum BuiltinDigests

    • Method Detail

      • values

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

        public static BuiltinDigests 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
      • getBlockSize

        public final int getBlockSize()
        Specified by:
        getBlockSize in interface DigestInformation
        Returns:
        The number of bytes in the digest's output
      • fromString

        public static BuiltinDigests fromString​(String s)
        Parameters:
        s - The Enum's name - ignored if null/empty
        Returns:
        The matching BuiltinDigests whose Enum.name() matches (case insensitive) the provided argument - null if no match
      • fromFactoryName

        public static BuiltinDigests fromFactoryName​(String name)
        Parameters:
        name - The factory name - ignored if null/empty
        Returns:
        The matching BuiltinDigests whose factory name matches (case insensitive) the provided name - null if no match
      • fromDigest

        public static BuiltinDigests fromDigest​(Digest d)
        Parameters:
        d - The Digest instance - ignored if null
        Returns:
        The matching BuiltinDigests whose algorithm matches (case insensitive) the digets's algorithm - null if no match
      • fromAlgorithm

        public static BuiltinDigests fromAlgorithm​(String algo)
        Parameters:
        algo - The algorithm to find - ignored if null/empty
        Returns:
        The matching BuiltinDigests whose algorithm matches (case insensitive) the provided name - null if no match