Applications that use an exemption mechanism may be granted stronger encryption capabilities than those which don't.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final ExemptionMechanismSpi | |
| private boolean | |
| private Key | |
| private final String | |
| private final Provider |
| Access | Constructor and Description |
|---|---|
| protected | ExemptionMechanism(ExemptionMechanismSpi
the delegate exmechSpi, Provider the provider provider, String the exemption mechanism mechanism)Creates an |
| Modifier and Type | Method and Description |
|---|---|
| public final byte[] | Returns: the new buffer with the result key blob.Generates the exemption mechanism key blob. |
| public final int | Returns: the number of bytes stored inoutputthe buffer for the result output)Generates the exemption mechanism key blob, and stores the result in
the |
| public final int | Returns: the number of bytes stored inoutputthe buffer for the result output, int the offset in outputOffset)output where the result
is storedGenerates the exemption mechanism key blob, and stores the result in
the |
| public static final ExemptionMechanism | Returns: the newExemptionMechanism objectthe standard name of the requested exemption
mechanism.
See the ExemptionMechanism section in the
Java Security Standard Algorithm Names Specification
for information about standard exemption mechanism names. algorithm)Returns an |
| public static final ExemptionMechanism | Returns: the newExemptionMechanism objectthe standard name of the requested exemption mechanism.
See the ExemptionMechanism section in the
Java Security Standard Algorithm Names Specification
for information about standard exemption mechanism names. algorithm, String the name of the provider. provider)Returns an |
| public static final ExemptionMechanism | Returns: the newExemptionMechanism objectthe standard name of the requested exemption mechanism.
See the ExemptionMechanism section in the
Java Security Standard Algorithm Names Specification
for information about standard exemption mechanism names. algorithm, Provider the provider. provider)Returns an |
| public final String | Returns: the exemption mechanism name of thisExemptionMechanism object.Returns the exemption mechanism name of this
|
| public final int | Returns: the required output buffer size (in bytes)the input length (in bytes) inputLen)Returns the length in bytes that an output buffer would need to be in
order to hold the result of the next
|
| public final Provider | Returns: the provider of thisExemptionMechanism object.Returns the provider of this |
| public final void | |
| public final void | init(Key
the key for this exemption mechanism key, AlgorithmParameterSpec the algorithm parameters params)Initializes this exemption mechanism with a key and a set of algorithm parameters. |
| public final void | init(Key
the key for this exemption mechanism key, AlgorithmParameters the algorithm parameters params)Initializes this exemption mechanism with a key and a set of algorithm parameters. |
| public final boolean | Returns: whether the result blob of the same key has been generated successfully by this exemption mechanism;false if key
is null.the key the crypto is going to use. key)Returns whether the result blob has been generated successfully by this exemption mechanism. |
| done | back to summary |
|---|---|
| private boolean done | |
| exmechSpi | back to summary |
|---|---|
| private final ExemptionMechanismSpi exmechSpi | |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| keyStored | back to summary |
|---|---|
| private Key keyStored | |
| mechanism | back to summary |
|---|---|
| private final String mechanism | |
| provider | back to summary |
|---|---|
| private final Provider provider | |
| ExemptionMechanism | back to summary |
|---|---|
| protected ExemptionMechanism(ExemptionMechanismSpi exmechSpi, Provider provider, String mechanism) Creates an
| |
| genExemptionBlob | back to summary |
|---|---|
| public final byte[] genExemptionBlob() throws IllegalStateException, ExemptionMechanismException Generates the exemption mechanism key blob.
| |
| genExemptionBlob | back to summary |
|---|---|
| public final int genExemptionBlob(byte[] output) throws IllegalStateException, ShortBufferException, ExemptionMechanismException Generates the exemption mechanism key blob, and stores the result in
the If the
| |
| genExemptionBlob | back to summary |
|---|---|
| public final int genExemptionBlob(byte[] output, int outputOffset) throws IllegalStateException, ShortBufferException, ExemptionMechanismException Generates the exemption mechanism key blob, and stores the result in
the If the
| |
| getInstance | back to summary |
|---|---|
| public static final ExemptionMechanism getInstance(String algorithm) throws NoSuchAlgorithmException Returns an This method traverses the list of registered security providers,
starting with the most preferred provider.
A new Note that the list of registered providers may be retrieved via
the Implementation Note The JDK Reference Implementation additionally uses the
| |
| getInstance | back to summary |
|---|---|
| public static final ExemptionMechanism getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException Returns an A new Note that the list of registered providers may be retrieved via
the
| |
| getInstance | back to summary |
|---|---|
| public static final ExemptionMechanism getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException Returns an A new
| |
| getName | back to summary |
|---|---|
| public final String getName() Returns the exemption mechanism name of this
This is the same name that was specified in one of the
| |
| getOutputSize | back to summary |
|---|---|
| public final int getOutputSize(int inputLen) throws IllegalStateException Returns the length in bytes that an output buffer would need to be in
order to hold the result of the next
The actual output length of the next
| |
| getProvider | back to summary |
|---|---|
| public final Provider getProvider() Returns the provider of this
| |
| init | back to summary |
|---|---|
| public final void init(Key key) throws InvalidKeyException, ExemptionMechanismException Initializes this exemption mechanism with a key. If this exemption mechanism requires any algorithm parameters
that cannot be derived from the given
| |
| init | back to summary |
|---|---|
| public final void init(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException Initializes this exemption mechanism with a key and a set of algorithm parameters. If this exemption mechanism requires any algorithm parameters
and
| |
| init | back to summary |
|---|---|
| public final void init(Key key, AlgorithmParameters params) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException Initializes this exemption mechanism with a key and a set of algorithm parameters. If this exemption mechanism requires any algorithm parameters
and
| |
| isCryptoAllowed | back to summary |
|---|---|
| public final boolean isCryptoAllowed(Key key) throws ExemptionMechanismException Returns whether the result blob has been generated successfully by this exemption mechanism. The method also makes sure that the key passed in is the same as the one this exemption mechanism used in initializing and generating phases.
| |