Enum BuiltinDigests

    • Field Detail

      • algorithm

        private final java.lang.String algorithm
      • blockSize

        private final int blockSize
      • factoryName

        private final java.lang.String factoryName
      • supported

        private final boolean supported
    • Constructor Detail

      • BuiltinDigests

        private BuiltinDigests​(java.lang.String factoryName,
                               java.lang.String algorithm,
                               int blockSize)
    • 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​(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
      • getName

        public final java.lang.String getName()
        Specified by:
        getName in interface NamedResource
        Returns:
        The resource name
      • getBlockSize

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

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<BuiltinDigests>
      • fromString

        public static BuiltinDigests fromString​(java.lang.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​(java.lang.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​(java.lang.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