com.sshtools.j2ssh.util

Class Hash


public class Hash
extends java.lang.Object

Version:
$Revision: 1.13 $
Author:
$author$

Constructor Summary

Hash(String algorithm)
Creates a new Hash object.

Method Summary

byte[]
doFinal()
void
putBigInteger(BigInteger bi)
void
putByte(byte b)
void
putBytes(byte[] data)
void
putInt(int i)
void
putString(String str)
void
reset()
static byte[]
simple(byte[] data, String algorithm)

Constructor Details

Hash

public Hash(String algorithm)
            throws NoSuchAlgorithmException
Creates a new Hash object.
Parameters:
algorithm -

Method Details

doFinal

public byte[] doFinal()
Returns:

putBigInteger

public void putBigInteger(BigInteger bi)
Parameters:
bi -

putByte

public void putByte(byte b)
Parameters:
b -

putBytes

public void putBytes(byte[] data)
Parameters:
data -

putInt

public void putInt(int i)
Parameters:
i -

putString

public void putString(String str)
Parameters:
str -

reset

public void reset()

simple

public static byte[] simple(byte[] data,
                            String algorithm)
            throws NoSuchAlgorithmException
Parameters:
data -
algorithm -
Returns:

Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.