org.less4j
Class SHA1

java.lang.Object
  extended by org.less4j.SHA1

public final class SHA1
extends java.lang.Object

This class implements the SHA-1 message digest algorithm (copied from Jython 2.3 without the dependencies and synchronization).

References:

  1. Bruce Schneier, "Section 18.7 Secure Hash Algorithm (SHA)," Applied Cryptography, 2nd edition, John Wiley & Sons, 1996

  2. NIST FIPS PUB 180-1, "Secure Hash Standard", U.S. Department of Commerce, May 1993.
    http://www.itl.nist.gov/div897/pubs/fip180-1.htm

Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

Revision: 1.7

Since:
Cryptix 2.2.2
Author:
Systemics Ltd, David Hopwood

Constructor Summary
SHA1()
          Constructs a SHA-1 message digest.
 
Method Summary
 SHA1 copy()
          Add an array of bytes to the digest.
 java.lang.String digest()
           
 java.lang.String hexdigest()
          Print out the digest in a form that can be easily compared to the test vectors.
 java.lang.String toString()
           
 void update(byte[] input)
          Add an array of bytes to the digest.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SHA1

public SHA1()
Constructs a SHA-1 message digest.

Method Detail

copy

public SHA1 copy()
Add an array of bytes to the digest.


digest

public java.lang.String digest()

hexdigest

public java.lang.String hexdigest()
Print out the digest in a form that can be easily compared to the test vectors.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

update

public void update(byte[] input)
Add an array of bytes to the digest.