Class ExemptionMechanism
java.lang.Object
javax.crypto.ExemptionMechanism
This class provides the functionality of an exemption mechanism, examples
of which are key recovery, key weakening, and
key escrow.
Applications that use an exemption mechanism may be granted stronger encryption capabilities than those which don't.
- Since:
- 1.4
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ExemptionMechanism
(ExemptionMechanismSpi exmechSpi, Provider provider, String mechanism) Creates anExemptionMechanism
object. -
Method Summary
Modifier and TypeMethodDescriptionfinal byte[]
Generates the exemption mechanism key blob.final int
genExemptionBlob
(byte[] output) Generates the exemption mechanism key blob, and stores the result in theoutput
buffer.final int
genExemptionBlob
(byte[] output, int outputOffset) Generates the exemption mechanism key blob, and stores the result in theoutput
buffer, starting atoutputOffset
inclusive.static final ExemptionMechanism
getInstance
(String algorithm) Returns anExemptionMechanism
object that implements the specified exemption mechanism algorithm.static final ExemptionMechanism
getInstance
(String algorithm, String provider) Returns anExemptionMechanism
object that implements the specified exemption mechanism algorithm.static final ExemptionMechanism
getInstance
(String algorithm, Provider provider) Returns anExemptionMechanism
object that implements the specified exemption mechanism algorithm.final String
getName()
Returns the exemption mechanism name of thisExemptionMechanism
object.final int
getOutputSize
(int inputLen) Returns the length in bytes that an output buffer would need to be in order to hold the result of the nextgenExemptionBlob
operation, given the input lengthinputLen
(in bytes).final Provider
Returns the provider of thisExemptionMechanism
object.final void
Initializes this exemption mechanism with a key.final void