|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.acplt.oncrpc.apps.jrpcgen.JrpcgenSHA
public class JrpcgenSHA
This class implements the SHA-1 algorithm as described in "Federal Information Processing Standards Publication 180-1: Specifications for the Secure Hash Standard. April 17, 1995."
Field Summary | |
---|---|
private long |
bytecount
|
private int |
H0
|
private int |
H1
|
private int |
H2
|
private int |
H3
|
private int |
H4
|
private int[] |
W
Work buffer for calculating the hash. |
Constructor Summary | |
---|---|
JrpcgenSHA()
Create a new SHA-1 hashing object. |
Method Summary | |
---|---|
byte[] |
getDigest()
Retrieve the digest (that is, informally spoken, the "hash value"). |
long |
getHash()
Return first 64 bits of hash digest for use as a serialization UID, etc. |
private void |
process()
Process a single block. |
void |
reset()
Reset the hashing engine to start hashing another set of innocent bytes. |
void |
update(byte b)
Update the hash using a single byte (8 bits). |
void |
update(int i)
Update the hash using an integer (32 bits). |
void |
update(short s)
Update the hash using a short integer (16 bits). |
void |
update(java.lang.String s)
Update the hash using a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final int[] W
private long bytecount
private int H0
private int H1
private int H2
private int H3
private int H4
Constructor Detail |
---|
public JrpcgenSHA()
Method Detail |
---|
public void update(byte b)
b
- Byte to hash.public void update(short s)
s
- Short integer to hash.public void update(int i)
i
- Integer to hash.public void update(java.lang.String s)
s
- String to hash.public void reset()
public byte[] getDigest()
public long getHash()
private void process()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |