Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper Demo version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## demo.pkcs.pkcs11
Class AlgorithmIDAdapter

    java.lang.Object
      iaik.asn1.structures.AlgorithmID
          demo.pkcs.pkcs11.AlgorithmIDAdapter

All Implemented Interfaces:
  iaik.asn1.ASN1Type, Cloneable

public class AlgorithmIDAdapter
extends iaik.asn1.structures.AlgorithmID

This class is an adapter to enables an application to use a different implementation than the standard implementation with the IAIK-JCE.

Invariants

Field Summary
`protected iaik.asn1.structures.AlgorithmID` | `delegate_` The delegate object to use, if no concrete implementation is set for a certain engine class.
`protected Signature` | `signatureEngine_` This is the signature engine to use for this object.

Fields inherited from class iaik.asn1.structures.AlgorithmID
`aes128_CBC, aes192_CBC, aes256_CBC, algorithmParameterSpecs, algorithms, arcfour, cast5_CBC, cms_3DES_wrap, cms_aes128_wrap, cms_aes192_wrap, cms_aes256_wrap, cms_cast5_wrap, cms_HMACwith3DES_wrap, cms_idea_wrap, cms_rc2_wrap, des_CBC, des_EDE3_CBC, dhKeyAgreement, dsa, dsa_, dsa_With_SHA1, dsaWithSHA, dsaWithSHA1, ecdsa, ecdsa_With_SHA1, esdh, esdhKeyAgreement, hMAC_MD5, hMAC_RIPEMD160, hMAC_SHA1, hMAC_SHA1_, idea_CBC, implementations, md2, md2WithRSAEncryption, md4, md4WithRSAEncryption, md5, md5WithRSAEncryption, mgf1, pbeWithMD5AndDES_CBC, pbeWithSHAAnd128BitRC2_CBC, pbeWithSHAAnd128BitRC4, pbeWithSHAAnd2_KeyTripleDES_CBC, pbeWithSHAAnd3_KeyTripleDES_CBC, pbeWithSHAAnd40BitRC2_CBC, pbeWithSHAAnd40BitRC4, pbkdf2, pSpecified, pwri_kek, rc2_CBC, rc4, rc5_CBC, ripeMd128, ripeMd160, rsa, rsaEncryption, rsaesOAEP, rsaSignatureWithRipemd128, rsaSignatureWithRipemd160, rsassaPss, sha, sha1, sha1WithRSAEncryption, sha1WithRSAEncryption_, sha224, sha224WithRSAEncryption, sha256, sha256WithRSAEncryption, sha384, sha384WithRSAEncryption, sha512, sha512WithRSAEncryption, sigS_ISO9796_2rndWithripemd160, sigS_ISO9796_2rndWithrsa, sigS_ISO9796_2rndWithsha1, sigS_ISO9796_2Withripemd160, sigS_ISO9796_2Withrsa, sigS_ISO9796_2Withsha1, ssdhKeyAgreement, zlib_compress`

Constructor Summary
`AlgorithmIDAdapter(iaik.asn1.structures.AlgorithmID delegate)` Creates a new AlgorithmIDAdapter that uses the given delegate object to get the .

Method Summary
`Signature` | `getSignatureInstance()` If a concrete signature implementation was set using setSignatureInstance(Signature), this method returns this.
`Signature` | `getSignatureInstance(String providerName)` If a concrete signature implementation was set using setSignatureInstance(Signature) and the provider name is null, this method returns this set signature implementation; otherwise, it delegates the call to the delegate of this object.
`void` | `setSignatureInstance(Signature signatureEngine)` Set the implementation to use as signature instance.

Methods inherited from class iaik.asn1.structures.AlgorithmID
`changeObjectID, changeOIDString, clone, decode, encodeAbsentParametersAsNull, equals, equals, getAlgorithm, getAlgorithmID, getAlgorithmParameters, getAlgorithmParameters, getAlgorithmParameters, getAlgorithmParameterSpec, getAlgorithmParameterSpec, getCipherInstance, getCipherInstance, getImplementationName, getInstance, getInstance, getKeyAgreementInstance, getKeyAgreementInstance, getKeyFactoryInstance, getKeyFactoryInstance, getKeyGeneratorInstance, getKeyGeneratorInstance, getKeyPairGeneratorInstance, getKeyPairGeneratorInstance, getMacInstance, getMacInstance, getMaskGenerationAlgorithmInstance, getMaskGenerationAlgorithmInstance, getMessageDigestInstance, getMessageDigestInstance, getName, getParameter, getRawImplementationName, getSecretKeyFactoryInstance, getSecretKeyFactoryInstance, hashCode, hasParameters, register, setAlgorithmParameters, setParameter, toASN1Object, toASN1Object, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### delegate_

    protected iaik.asn1.structures.AlgorithmID delegate_

  The delegate object to use, if no concrete implementation is set for a certain engine class.

### signatureEngine_

    protected Signature signatureEngine_

  This is the signature engine to use for this object.

Constructor Detail

### AlgorithmIDAdapter

    public AlgorithmIDAdapter(iaik.asn1.structures.AlgorithmID delegate)

  Creates a new AlgorithmIDAdapter that uses the given delegate object to get the .

Parameters:
  `delegate` - The object to get other implementations from, implementations not provided by this object.
Preconditions
Postconditions

Method Detail

### setSignatureInstance

    public void setSignatureInstance(Signature signatureEngine)

  Set the implementation to use as signature instance.

  Parameters:
    `signatureEngine` - The implementation of the signature class to return upon a call to getSignatureInstance(). If null, the implementation is unset.
  Preconditions
  Postconditions

### getSignatureInstance

    public Signature getSignatureInstance()
                                   throws NoSuchAlgorithmException

  If a concrete signature implementation was set using setSignatureInstance(Signature), this method returns this. Otherwise, it delegates the call to the delegate of this object.

  Returns:
    The signature engine to use for this algorthim.
  Throws:
    `NoSuchAlgorithmException` - If there is no signature implementation for this algorithm.
  Preconditions
  Postconditions

### getSignatureInstance

    public Signature getSignatureInstance(String providerName)
                                   throws NoSuchAlgorithmException

  If a concrete signature implementation was set using setSignatureInstance(Signature) and the provider name is null, this method returns this set signature implementation; otherwise, it delegates the call to the delegate of this object.

  Returns:
    The signature engine to use for this algorthim.
  Throws:
    `NoSuchAlgorithmException` - If there is no signature implementation for this algorithm.
  Preconditions
  Postconditions

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper Demo version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2002, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.