public static final ExemptionMechanism getInstance (String algorithm, Provider provider) throws NoSuchAlgorithmException

Returns an ExemptionMechanism object that implements the specified exemption mechanism algorithm.

A new ExemptionMechanism object encapsulating the ExemptionMechanismSpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list.

Parameters:
algorithm    the standard name of the requested exemption mechanism. See the ExemptionMechanism section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard exemption mechanism names.
provider    the provider.

Returns:  the new ExemptionMechanism object.

Exceptions:
NullPointerException    if algorithm is null.
NoSuchAlgorithmException    if an ExemptionMechanismSpi implementation for the specified algorithm is not available from the specified Provider object.
IllegalArgumentException    if the provider is null.

See also:
java.security.Provider