public class JrpcgenSHA extends Object
| Constructor and Description |
|---|
JrpcgenSHA()
Create a new SHA-1 hashing object.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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(String s)
Update the hash using a string.
|
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(String s)
s - String to hash.public void reset()
public byte[] getDigest()
public long getHash()
Copyright © 2014. All Rights Reserved.