|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.perforce.p4java.impl.mapbased.rpc.func.helper.MD5Digester
public class MD5Digester
Provide MD5 digest methods for the rest of the RPC implementation. Basically just a wrapper around the normal Java stuff, with a useful added method to finalise the digest as a hex string.
| Field Summary | |
|---|---|
static String |
DIGEST_TYPE
|
| Constructor Summary | |
|---|---|
MD5Digester()
|
|
| Method Summary | |
|---|---|
String |
digestAs32ByteHex()
Return the finalised digest as a 32 byte hex string. |
byte[] |
digestAsBytes()
|
String |
digestFileAs32ByteHex(File file)
Return the results of digesting an arbitrary file with this digester. |
String |
digestFileAs32ByteHex(File file,
Charset charset)
Return the results of digesting an arbitrary file with this digester. |
String |
digestFileAs32ByteHex(File file,
Charset charset,
boolean convertLineEndings)
Return the results of digesting an arbitrary file with this digester. |
String |
digestFileAs32ByteHex(File file,
Charset charset,
boolean convertLineEndings,
ClientLineEnding clientLineEnding)
Return the results of digesting an arbitrary file with this digester and a specific client line ending. |
void |
reset()
|
void |
update(byte[] bytes)
|
void |
update(byte[] bytes,
int off,
int len)
|
void |
update(ByteBuffer byteBuf)
NOTE: side effects!! |
void |
update(String str)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DIGEST_TYPE
| Constructor Detail |
|---|
public MD5Digester()
| Method Detail |
|---|
public void reset()
public void update(String str)
public void update(byte[] bytes)
public void update(byte[] bytes,
int off,
int len)
public void update(ByteBuffer byteBuf)
public byte[] digestAsBytes()
public String digestAs32ByteHex()
public String digestFileAs32ByteHex(File file,
Charset charset)
Returns null if it can't read or digest the file for whatever reason; otherwise the finalized digest is returned as a 32 byte hex string.
file - charset -
public String digestFileAs32ByteHex(File file,
Charset charset,
boolean convertLineEndings)
Returns null if it can't read or digest the file for whatever reason; otherwise the finalized digest is returned as a 32 byte hex string.
file - charset - convertLineEndings -
public String digestFileAs32ByteHex(File file,
Charset charset,
boolean convertLineEndings,
ClientLineEnding clientLineEnding)
Returns null if it can't read or digest the file for whatever reason; otherwise the finalized digest is returned as a 32 byte hex string.
file - charset - convertLineEndings - clientLineEnding -
public String digestFileAs32ByteHex(File file)
Returns null if it can't read or digest the file for whatever reason; otherwise the finalized digest is returned as a 32 byte hex string.
file -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||