IAIK PKCS#11 Provider API Documentation
version 1.6

iaik.pkcs.pkcs11.provider
Class DefaultDelegateProvider

java.lang.Object
  extended by iaik.pkcs.pkcs11.provider.Configurable
      extended by iaik.pkcs.pkcs11.provider.DelegateProvider
          extended by iaik.pkcs.pkcs11.provider.DefaultDelegateProvider

public class DefaultDelegateProvider
extends DelegateProvider

This is the default implementation of the delegate provider. It is used as default for the global delegate provider and the providers' delegate providers. This implementation can be configured using the iaik/pkcs/pkcs11/provider/DefaultDelegateProvider.properties. If the configured provider is no valid delegate (e.g. it is also a PKCS#11 provider), this implementation uses the IAIK provider (name IAIK).

Author:
Karl Scheibelhofer
Invariants
(properties_ <> null)

Field Summary
static java.lang.String CIPHER_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for cipher implementations.
static java.lang.String DEFAULT_PROPERTIES
          The properties file that contains the configuration of this delegate provder.
static java.lang.String FALLBACK_SOFTWARE_PROVIDER
          The property entry of the name of the fallback provider.
static java.lang.String KEY_AGREEMENT_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for key agreement implementations.
static java.lang.String KEY_FACTORY_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for key factory implementations.
static java.lang.String MAC_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for MAC implementations.
static java.lang.String MESSAGE_DIGEST_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for message digest implementations.
static java.lang.String PARAMETERS_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for algorithm parameter implementations.
static java.lang.String PROPERTIES
          The properties file that contains the configuration of this delegate provder.
static java.lang.String SECRET_KEY_FACTORY_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for secret key factory implementations.
static java.lang.String SECURE_RANDOM_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for secure random implementations.
static java.lang.String SIGNATURE_DELEGATE_PROVIDER
          The property entry of the name of the provider that is used for signature implementations.
 
Constructor Summary
DefaultDelegateProvider()
          The default constructor.
DefaultDelegateProvider(java.util.Properties configuration)
          Constructor taking the configuration in form of a properties object.
 
Method Summary
 javax.crypto.Cipher getCipher(java.lang.String algorithmName)
          Get a cipher implementation of the given algorithm.
 javax.crypto.KeyAgreement getKeyAgreement(java.lang.String algorithmName)
          Get a key agreement implementation of the given algorithm.
 java.security.KeyFactory getKeyFactory(java.lang.String algorithmName)
          Get a key factory implementation for the given algorithm.
 javax.crypto.Mac getMac(java.lang.String algorithmName)
          Get a MAC implementation of the given algorithm.
 java.security.MessageDigest getMessageDigest(java.lang.String algorithmName)
          Get a message digest implementation of the given algorithm.
 java.security.AlgorithmParameters getParameters(java.lang.String algorithmName)
          Get a algorithm parameters implementation of the given algorithm.
 javax.crypto.SecretKeyFactory getSecretKeyFactory(java.lang.String algorithmName)
          Get a key factory implementation for the given algorithm.
 java.security.SecureRandom getSecureRandom(java.lang.String algorithmName)
          Get a secure random implementation for the given algorithm.
 java.security.Signature getSignature(java.lang.String algorithmName)
          Get a signature implementation of the given algorithm.
 
Methods inherited from class iaik.pkcs.pkcs11.provider.Configurable
addProperties, getProperties, setProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROPERTIES

public static final java.lang.String DEFAULT_PROPERTIES
The properties file that contains the configuration of this delegate provder.

See Also:
Constant Field Values

PROPERTIES

public static final java.lang.String PROPERTIES
The properties file that contains the configuration of this delegate provder.

See Also:
Constant Field Values

FALLBACK_SOFTWARE_PROVIDER

public static final java.lang.String FALLBACK_SOFTWARE_PROVIDER
The property entry of the name of the fallback provider.

See Also:
Constant Field Values

MESSAGE_DIGEST_DELEGATE_PROVIDER

public static final java.lang.String MESSAGE_DIGEST_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for message digest implementations.

See Also:
Constant Field Values

CIPHER_DELEGATE_PROVIDER

public static final java.lang.String CIPHER_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for cipher implementations.

See Also:
Constant Field Values

PARAMETERS_DELEGATE_PROVIDER

public static final java.lang.String PARAMETERS_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for algorithm parameter implementations.

See Also:
Constant Field Values

KEY_AGREEMENT_DELEGATE_PROVIDER

public static final java.lang.String KEY_AGREEMENT_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for key agreement implementations.

See Also:
Constant Field Values

KEY_FACTORY_DELEGATE_PROVIDER

public static final java.lang.String KEY_FACTORY_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for key factory implementations.

See Also:
Constant Field Values

MAC_DELEGATE_PROVIDER

public static final java.lang.String MAC_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for MAC implementations.

See Also:
Constant Field Values

SECRET_KEY_FACTORY_DELEGATE_PROVIDER

public static final java.lang.String SECRET_KEY_FACTORY_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for secret key factory implementations.

See Also:
Constant Field Values

SECURE_RANDOM_DELEGATE_PROVIDER

public static final java.lang.String SECURE_RANDOM_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for secure random implementations.

See Also:
Constant Field Values

SIGNATURE_DELEGATE_PROVIDER

public static final java.lang.String SIGNATURE_DELEGATE_PROVIDER
The property entry of the name of the provider that is used for signature implementations.

See Also:
Constant Field Values
Constructor Detail

DefaultDelegateProvider

public DefaultDelegateProvider()
The default constructor. Sets the configuration properties to the configured default properties.


DefaultDelegateProvider

public DefaultDelegateProvider(java.util.Properties configuration)
Constructor taking the configuration in form of a properties object. The key names of this properties object are the same as in the respective properties file.

Parameters:
configuration - The properties providing the configuration.
Method Detail

getCipher

public javax.crypto.Cipher getCipher(java.lang.String algorithmName)
Get a cipher implementation of the given algorithm.

Specified by:
getCipher in class DelegateProvider
Parameters:
algorithmName - The algorithm name.
Returns:
The implementation object of the requested algorithm or null, if there is no appropriate implementation available.

getParameters

public java.security.AlgorithmParameters getParameters(java.lang.String algorithmName)
Get a algorithm parameters implementation of the given algorithm.

Specified by:
getParameters in class DelegateProvider
Parameters:
algorithmName - The algorithm name.
Returns:
The implementation object of the requested algorithm parameters or null, if there is no appropriate implementation available.

getKeyAgreement

public javax.crypto.KeyAgreement getKeyAgreement(java.lang.String algorithmName)
Get a key agreement implementation of the given algorithm.

Specified by:
getKeyAgreement in class DelegateProvider
Parameters:
algorithmName - The algorithm name.
Returns:
The implementation object of the requested algorithm or null, if there is no appropriate implementation available.

getKeyFactory

public java.security.KeyFactory getKeyFactory(java.lang.String algorithmName)
Get a key factory implementation for the given algorithm.

Specified by:
getKeyFactory in class DelegateProvider
Parameters:
algorithmName - The name of the requested algorithm.
Returns:
The key factory implementation or null if there is no appropriate implementation available.

getMac

public javax.crypto.Mac getMac(java.lang.String algorithmName)
Get a MAC implementation of the given algorithm.

Specified by:
getMac in class DelegateProvider
Parameters:
algorithmName - The algorithm name.
Returns:
The implementation object of the requested algorithm or null, if there is no appropriate implementation available.

getMessageDigest

public java.security.MessageDigest getMessageDigest(java.lang.String algorithmName)
Get a message digest implementation of the given algorithm.

Specified by:
getMessageDigest in class DelegateProvider
Parameters:
algorithmName - The algorithm name.
Returns:
The implementation object of the requested algorithm or null, if there is no appropriate implementation available.

getSecretKeyFactory

public javax.crypto.SecretKeyFactory getSecretKeyFactory(java.lang.String algorithmName)
Get a key factory implementation for the given algorithm.

Specified by:
getSecretKeyFactory in class DelegateProvider
Parameters:
algorithmName - The name of the requested algorithm.
Returns:
The key factory implementation or null if there is no appropriate implementation available.

getSecureRandom

public java.security.SecureRandom getSecureRandom(java.lang.String algorithmName)
Get a secure random implementation for the given algorithm.

Specified by:
getSecureRandom in class DelegateProvider
Parameters:
algorithmName - The name of the requested algorithm or null to get the default.
Returns:
The cipher implementation or null if there is no appropriate implementation available.

getSignature

public java.security.Signature getSignature(java.lang.String algorithmName)
Get a signature implementation of the given algorithm.

Specified by:
getSignature in class DelegateProvider
Parameters:
algorithmName - The algorithm name.
Returns:
The implementation object of the requested algorithm or null, if there is no appropriate implementation available.

IAIK PKCS#11 Provider API Documentation
version 1.6

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.
version 1.6