iaik.utils
Class IaikSecurity

java.lang.Object
  |
  +--iaik.utils.IaikSecurity

public class IaikSecurity
extends Object

This class handles Security providers, algorithm names, aliases, and so on. Once a IaikSecurity object is created, the getImplementation method is called for searching for a provider specific implemetation of the requested cryptographic object. If, for instance, a DES cipher implementation of the IAIK provider would be requested the following program sequence will be performed:

 IaikSecurity iaik = new IaikSecurity("DES", "Cipher", "IAIK");
 CipherSpi cipher_spi = (CipherSpi)iaik.getImplementation();
 

Version:
File Revision 7

Constructor Summary
IaikSecurity(String algorithm, String type, String provider)
          Creates an IaikSecurity object to search for a algorithm of the given type, implemented by the given provider.
 
Method Summary
 Object getImplementation()
          Tries to find an implemenation for a specific algorithm.
 Provider getProvider()
          Returns the provider implementing the actual algorithm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IaikSecurity

public IaikSecurity(String algorithm,
                    String type,
                    String provider)
Creates an IaikSecurity object to search for a algorithm of the given type, implemented by the given provider.
Parameters:
algorithm - the name of the algorithm (or an alias)
type - the type of the algorithm e.g. Cipher
provider - the desired provider or null if any provider is appropriate
Method Detail

getImplementation

public Object getImplementation()
                         throws NoSuchAlgorithmException,
                                NoSuchProviderException
Tries to find an implemenation for a specific algorithm.
Returns:
an array of Object where Object[0] is the implementation of the algorithm and Object[1] is the Provider
Throws:
NoSuchAlgorithmException - if no provider implements the algorithm
NoSuchProviderException - if the provider does not exist

getProvider

public Provider getProvider()
Returns the provider implementing the actual algorithm
Returns:
the provider

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK