gnu.crypto.jce.hash

Class MessageDigestAdapter

class MessageDigestAdapter extends MessageDigestSpi implements Cloneable

The implementation of a generic java.security.MessageDigest adapter class to wrap gnu.crypto hash instances.

This class defines the Service Provider Interface (SPI) for the java.security.MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA. Message digests are secure one-way hash functions that take arbitrary-sized data and output a fixed- length hash value.

All the abstract methods in the java.security.MessageDigestSpi class are implemented by this class and all its sub-classes.

All the implementations which subclass this object, and which are serviced by the GNU Crypto provider implement the java.lang.Cloneable interface.

Version: $Revision: 1.2 $

Constructor Summary
protected MessageDigestAdapter(String mdName)
Trivial protected constructor.
Method Summary
Objectclone()
byte[]engineDigest()
intengineDigest(byte[] buf, int offset, int len)
intengineGetDigestLength()
voidengineReset()
voidengineUpdate(byte input)
voidengineUpdate(byte[] input, int offset, int len)

Constructor Detail

MessageDigestAdapter

protected MessageDigestAdapter(String mdName)
Trivial protected constructor.

Parameters: mdName the canonical name of the hash algorithm.

Method Detail

clone

public Object clone()

engineDigest

public byte[] engineDigest()

engineDigest

public int engineDigest(byte[] buf, int offset, int len)

engineGetDigestLength

public int engineGetDigestLength()

engineReset

public void engineReset()

engineUpdate

public void engineUpdate(byte input)

engineUpdate

public void engineUpdate(byte[] input, int offset, int len)
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.