iaik.cms
Class IaikJCECipher

java.lang.Object
  extended by iaik.cms.IaikJCECipher

public class IaikJCECipher
extends java.lang.Object

This class is used to foward Cipher object creation to the IAIK-JCE library.

When creating a Cipher instance the IAIK-CMS SecurityProvider does not call Cipher.getInstance; rather it calls JCECipher.create().getCipher. If a JDK version >= 1.3 and an IAIK-JCE version >= 3.17 is used, JCECipher.create() returns a IaikJCECipher object. A call to iaikJCECipher.getCipher() creates the Cipher object by calling IaikSecurity.getCipher(). This ensures that the final Cipher.getInstance call is made within the IAIK-JCE library. Now -- when using the unlimited strength CryptoPerms containing iaik_jce_(full).jar file -- the Cipher object allows arbitrary key sizes even if the default policy files are installed.


Constructor Summary
IaikJCECipher()
           
 
Method Summary
 javax.crypto.Cipher getCipher(java.lang.String algorithm, java.security.Provider provider)
          Gets a Cipher instance for the requested algorithm.
 javax.crypto.Cipher getCipher(java.lang.String algorithm, java.lang.String providerName)
          Gets a Cipher instance for the requested algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IaikJCECipher

public IaikJCECipher()
Method Detail

getCipher

public javax.crypto.Cipher getCipher(java.lang.String algorithm,
                                     java.lang.String providerName)
                              throws javax.crypto.NoSuchPaddingException,
                                     java.security.NoSuchAlgorithmException,
                                     java.security.NoSuchProviderException
Gets a Cipher instance for the requested algorithm.

Parameters:
algorithm - the Cipher algorithm (transformation)
providerName - the name of the provider from which to get the Cipher instance or null if using any provider
Returns:
the Cipher instance
Throws:
java.security.NoSuchProviderException - if providerName is not null, but the corresponding provider is not installed
java.security.NoSuchAlgorithmException - if no implementation for the requested cipher algorithm is available
javax.crypto.NoSuchPaddingException - if the requested padding scheme is not available

getCipher

public javax.crypto.Cipher getCipher(java.lang.String algorithm,
                                     java.security.Provider provider)
                              throws javax.crypto.NoSuchPaddingException,
                                     java.security.NoSuchAlgorithmException,
                                     java.security.NoSuchProviderException
Gets a Cipher instance for the requested algorithm.

Parameters:
algorithm - the Cipher algorithm (transformation)
provider - the provider from which to get the Cipher instance or null if using any provider
Returns:
the Cipher instance
Throws:
java.security.NoSuchProviderException - if providerName is not null, but the corresponding provider is not installed
java.security.NoSuchAlgorithmException - if no implementation for the requested cipher algorithm is available
javax.crypto.NoSuchPaddingException - if the requested padding scheme is not available

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC