Overview | Package | Class | Tree | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.crypto.jce
Class MessageDigestAdapter

    java.lang.Object
      |
      +--java.security.MessageDigestSpi
            |
            +--gnu.crypto.jce.MessageDigestAdapter

All Implemented Interfaces:
  java.lang.Cloneable

Direct Known Subclasses:
  MD4Spi, MD5Spi, RipeMD128Spi, RipeMD160Spi, Sha160Spi, WhirlpoolSpi

class MessageDigestAdapter
extends java.security.MessageDigestSpi
implements java.lang.Cloneable

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

This class defines the Service Provider Interface (SPI) for the `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 `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 `Cloneable` interface.

Version:
  $Revision: 1.2 $

Constructor Summary
`protected` | `MessageDigestAdapter(java.lang.String mdName)` Trivial protected constructor.

Method Summary
`java.lang.Object` | `clone()`
`byte[]` | `engineDigest()`
`int` | `engineDigest(byte[] buf, int offset, int len)`
`int` | `engineGetDigestLength()`
`void` | `engineReset()`
`void` | `engineUpdate(byte input)`
`void` | `engineUpdate(byte[] input, int offset, int len)`

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

Constructor Detail

### MessageDigestAdapter

    protected MessageDigestAdapter(java.lang.String mdName)

  Trivial protected constructor.
  Parameters:
    `mdName` - the canonical name of the hash algorithm.

Method Detail

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.security.MessageDigestSpi`

### engineGetDigestLength

    public int engineGetDigestLength()

  Overrides:
    `engineGetDigestLength` in class `java.security.MessageDigestSpi`

### engineUpdate

    public void engineUpdate(byte input)

  Overrides:
    `engineUpdate` in class `java.security.MessageDigestSpi`

### engineUpdate

    public void engineUpdate(byte[] input,
                             int offset,
                             int len)

  Overrides:
    `engineUpdate` in class `java.security.MessageDigestSpi`

### engineDigest

    public byte[] engineDigest()

  Overrides:
    `engineDigest` in class `java.security.MessageDigestSpi`

### engineDigest

    public int engineDigest(byte[] buf,
                            int offset,
                            int len)
                     throws java.security.DigestException

  Overrides:
    `engineDigest` in class `java.security.MessageDigestSpi`

### engineReset

    public void engineReset()

  Overrides:
    `engineReset` in class `java.security.MessageDigestSpi`

Overview | Package | Class | Tree | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©2001-2002 Free Software Foundation, Inc.. All Rights Reserved.