javax.crypto
Class IaikSecurity
java.lang.Object
|
+--javax.crypto.IaikSecurity
- public class IaikSecurity
- extends java.lang.Object
This class handles Security providers, algorithm names, aliases, and so on.
Once a IiakSecurity 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();
|
Constructor Summary |
IaikSecurity(java.lang.String algorithm,
java.lang.String type,
java.lang.String provider)
Creates an IaikSecurity object to search for a algorithm
of the given type, implemented by the given provider. |
|
Method Summary |
java.lang.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 |
IaikSecurity
public IaikSecurity(java.lang.String algorithm,
java.lang.String type,
java.lang.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. Cipherprovider - the desired provider or null if any provider is appropriate
getImplementation
public java.lang.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