public class IaikJCECipher
extends java.lang.Object
When creating a Cipher instance the iSaSiLk IaikProvider
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 and Description |
---|
IaikJCECipher() |
Modifier and Type | Method and Description |
---|---|
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.
|
public javax.crypto.Cipher getCipher(java.lang.String algorithm, java.lang.String providerName) throws javax.crypto.NoSuchPaddingException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException
algorithm
- the Cipher algorithm (transformation)providerName
- the name of the provider from which to get the Cipher
instance or null
if using any providerjava.security.NoSuchProviderException
- if providerName
is not null
, but
the corresponding provider is not installedjava.security.NoSuchAlgorithmException
- if no implementation for the requested cipher
algorithm is availablejavax.crypto.NoSuchPaddingException
- if the requested padding scheme is not availablepublic javax.crypto.Cipher getCipher(java.lang.String algorithm, java.security.Provider provider) throws javax.crypto.NoSuchPaddingException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException
algorithm
- the Cipher algorithm (transformation)provider
- the provider from which to get the Cipher
instance or null
if using any providerjava.security.NoSuchProviderException
- if providerName
is not null
, but
the corresponding provider is not installedjava.security.NoSuchAlgorithmException
- if no implementation for the requested cipher
algorithm is availablejavax.crypto.NoSuchPaddingException
- if the requested padding scheme is not available