Class IaikJCECipher

  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
Method Summary
 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


public IaikJCECipher()
Method Detail


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

algorithm - the Cipher algorithm (transformation)
providerName - the name of the provider from which to get the Cipher instance or null if using any provider
the Cipher instance
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 5.1, (c) 2002 IAIK, (c) 2003 - 2010 SIC