Enum EMacAlgorithm

    • Method Detail

      • values

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

        public static EMacAlgorithm 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
      • getAlgorithm

        @Nonnull
        @Nonempty
        public String getAlgorithm()
        Returns:
        The internal name of the message digest algorithm. Neither null nor empty.
      • createMac

        @Nonnull
        public Mac createMac()
        Returns:
        A new Mac with this algorithm using the default security provider.
        Throws:
        IllegalStateException - If this algorithm is not supported by this Java runtime.
      • createMac

        @Nonnull
        public Mac createMac​(@Nullable
                             Provider aSecurityProvider)
        Parameters:
        aSecurityProvider - The security provider to use. May be null to use the default security provider.
        Returns:
        A new Mac with this algorithm using the provided or the default security provider.
        Throws:
        IllegalStateException - If this algorithm is not supported by this Java runtime.