| java.lang.Object org.python.modules.SHA1
SHA1 | final public class SHA1 (Code) | | This class implements the SHA-1 message digest algorithm.
References:
- Bruce Schneier,
"Section 18.7 Secure Hash Algorithm (SHA),"
Applied Cryptography, 2nd edition,
John Wiley & Sons, 1996
- 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
author: Systemics Ltd author: David Hopwood since: Cryptix 2.2.2 |
Constructor Summary | |
public | SHA1() Constructs a SHA-1 message digest. |
Method Summary | |
public SHA1 | copy() Add an array of bytes to the digest. | public String | digest() | protected byte[] | engineDigest() SPI: Calculates the final digest. | protected byte[] | engineDigest(byte[] in, int length) Returns the digest of the data added and resets the digest. | protected void | engineReset() Initializes (resets) the message digest. | protected void | engineTransform(byte[] in) Adds data to the message digest. | protected void | engineUpdate(byte b) SPI: Updates the message digest with a byte of new data. | protected void | engineUpdate(byte[] data, int offset, int length) SPI: Updates the message digest with new data. | public String | hexdigest() Print out the digest in a form that can be easily compared
to the test vectors. | public String | toString() | public synchronized void | update(byte input) Add an array of bytes to the digest. |
digest_size | public int digest_size(Code) | | |
SHA1 | public SHA1()(Code) | | Constructs a SHA-1 message digest.
|
copy | public SHA1 copy()(Code) | | Add an array of bytes to the digest.
|
engineDigest | protected byte[] engineDigest()(Code) | | SPI: Calculates the final digest. BlockMessageDigest
subclasses should not usually override this method.
the digest as a byte array. |
engineDigest | protected byte[] engineDigest(byte[] in, int length)(Code) | | Returns the digest of the data added and resets the digest.
the digest of all the data added to the message digestas a byte array. |
engineReset | protected void engineReset()(Code) | | Initializes (resets) the message digest.
|
engineTransform | protected void engineTransform(byte[] in)(Code) | | Adds data to the message digest.
Parameters: data - The data to be added. Parameters: offset - The start of the data in the array. Parameters: length - The amount of data to add. |
engineUpdate | protected void engineUpdate(byte b)(Code) | | SPI: Updates the message digest with a byte of new data.
Parameters: b - the byte to be added. |
engineUpdate | protected void engineUpdate(byte[] data, int offset, int length)(Code) | | SPI: Updates the message digest with new data.
Parameters: data - the data to be added. Parameters: offset - the start of the data in the array. Parameters: length - the number of bytes of data to add. |
hexdigest | public String hexdigest()(Code) | | Print out the digest in a form that can be easily compared
to the test vectors.
|
update | public synchronized void update(byte input)(Code) | | Add an array of bytes to the digest.
|
|
|