ExemptionMechanism


ExemptionMechanism javax.crypto

Java 1.4

Some countries place legal restrictions on the use of cryptographic algorithms. In some cases, a program may be exempt from these restrictions if it implements an "exemption mechanism" such as key recovery, key escrow, or key weakening. This class defines a very general API to such mechanism. This class is rarely used, and is not supported in the default implementation provided by Sun. Using this class successfully is quite complex, and is beyond the scope of this reference. For details, see the discussion "How to Make Applications `Exempt' from Cryptographic Restrictions" in the JCE Reference Guide which is part of the standard bundle of documentation shipped by Sun with the JDK.

 public class  ExemptionMechanism  {  // Protected Constructors  protected  ExemptionMechanism  (ExemptionMechanismSpi  exmechSpi  ,          java.security.Provider  provider  , String  mechanism  );  // Public Class Methods  public static final ExemptionMechanism  getInstance  (String  algorithm  )         throws java.security.NoSuchAlgorithmException;        public static final ExemptionMechanism  getInstance  (String  algorithm  ,          String  provider  ) throws java.security.NoSuchAlgorithmException,          java.security.NoSuchProviderException;        public static final ExemptionMechanism  getInstance  (String  algorithm  ,          java.security.Provider  provider  )          throws java.security.NoSuchAlgorithmException;  // Public Instance Methods  public final byte[ ]  genExemptionBlob  ( ) throws IllegalStateException,          ExemptionMechanismException;        public final int  genExemptionBlob  (byte[ ]  output  )          throws IllegalStateException, ShortBufferException,          ExemptionMechanismException;        public final int  genExemptionBlob  (byte[ ]  output  , int  outputOffset  )          throws IllegalStateException, ShortBufferException,          ExemptionMechanismException;        public final String  getName  ( );        public final int  getOutputSize  (int  inputLen  ) throws IllegalStateException;        public final java.security.Provider  getProvider  ( );        public final void  init  (java.security.Key  key  )           throws java.security.InvalidKeyException,           ExemptionMechanismException;        public final void  init  (java.security.Key  key  ,           java.security.spec.AlgorithmParameterSpec  params  )           throws java.security.InvalidKeyException,           java.security.InvalidAlgorithmParameterException,           ExemptionMechanismException;        public final void  init  (java.security.Key  key  ,           java.security.AlgorithmParameters  params  )           throws java.security.InvalidKeyException,           java.security.InvalidAlgorithmParameterException,           ExemptionMechanismException;        public final boolean  isCryptoAllowed  (java.security.Key  key  )           throws ExemptionMechanismException;  // Protected Methods Overriding Object  protected void  finalize  ( );   } 

Returned By

Cipher.getExemptionMechanism( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net