IAIK PKCS#11 Provider API Documentation
version 1.6

iaik.pkcs.pkcs11.provider.hashes
Class PKCS11Hash

java.lang.Object
  extended by java.security.MessageDigestSpi
      extended by java.security.MessageDigest
          extended by iaik.pkcs.pkcs11.provider.hashes.PKCS11Hash
All Implemented Interfaces:
PKCS11EngineClass
Direct Known Subclasses:
FastHash, Md2, Md5, RipeMd128, RipeMd160, Sha1, Sha256, Sha384, Sha512

public abstract class PKCS11Hash
extends java.security.MessageDigest
implements PKCS11EngineClass

This class implements a generic digest algorithm that uses a PKCS#11 token to claculate the hash value. This message digest object gets its provider instance by calling getProvider(). It binds to the token of this provider instance.

Author:
Karl Scheibelhofer

Method Summary
 TokenManager getTokenManager()
          Get the manager of the token that processes this digest.
 iaik.pkcs.pkcs11.Mechanism getUsedMechanism()
           
 boolean isSupportedBy(TokenManager tokenManager)
          Check, if the current token of the given token manager supports the required features for this engine class.
 void setTokenManager(TokenManager tokenManager)
          Set the manager of the token that processes this digest.
 
Methods inherited from class java.security.MessageDigest
clone, digest, digest, digest, getAlgorithm, getDigestLength, getInstance, getInstance, getInstance, getProvider, isEqual, reset, toString, update, update, update, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getUsedMechanism

public iaik.pkcs.pkcs11.Mechanism getUsedMechanism()

isSupportedBy

public boolean isSupportedBy(TokenManager tokenManager)
Check, if the current token of the given token manager supports the required features for this engine class.

Specified by:
isSupportedBy in interface PKCS11EngineClass
Parameters:
tokenManager - The token manager. Used to get information about the current token.
Returns:
True, if this engine class can be used with the currently present token of the given token manager.
Preconditions
(tokenManager <> null)

getTokenManager

public TokenManager getTokenManager()
Get the manager of the token that processes this digest.

Returns:
The manager of the token that processes this digest.
Postconditions
(result <> null)

setTokenManager

public void setTokenManager(TokenManager tokenManager)
Set the manager of the token that processes this digest.

Parameters:
tokenManager - The manager of the token that processes this digest.
Preconditions
(tokenManager <> null)

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