public class MD5Digester
extends java.lang.Object
| Constructor and Description |
|---|
MD5Digester() |
MD5Digester(int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
digestAs32ByteHex()
Return the finalised digest as a 32 byte hex string.
|
byte[] |
digestAsBytes() |
java.lang.String |
digestFileAs32ByteHex(java.io.File file)
Return the results of digesting an arbitrary file with this digester.
|
java.lang.String |
digestFileAs32ByteHex(java.io.File file,
java.nio.charset.Charset charset)
Return the results of digesting an arbitrary file with this digester.
|
java.lang.String |
digestFileAs32ByteHex(java.io.File file,
java.nio.charset.Charset charset,
boolean doesNeedConvertLineEndings)
Return the results of digesting an arbitrary file with this digester.
|
java.lang.String |
digestFileAs32ByteHex(java.io.File file,
java.nio.charset.Charset charset,
boolean isRequireLineEndingConvert,
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(java.lang.String str) |
public MD5Digester()
throws P4JavaError
P4JavaErrorpublic MD5Digester(@Nonnull
int bufferSize)
public byte[] digestAsBytes()
@Nullable
public java.lang.String digestFileAs32ByteHex(@Nonnull
java.io.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 - filepublic void reset()
public void update(byte[] bytes,
int off,
int len)
public java.lang.String digestAs32ByteHex()
@Nullable
public java.lang.String digestFileAs32ByteHex(@Nonnull
java.io.File file,
@Nullable
java.nio.charset.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 - filecharset - charset@Nullable
public java.lang.String digestFileAs32ByteHex(@Nonnull
java.io.File file,
@Nullable
java.nio.charset.Charset charset,
boolean doesNeedConvertLineEndings)
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 - filecharset - charsetdoesNeedConvertLineEndings - doesNeedConvertLineEndings@Nullable
public java.lang.String digestFileAs32ByteHex(@Nonnull
java.io.File file,
@Nullable
java.nio.charset.Charset charset,
boolean isRequireLineEndingConvert,
@Nullable
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 - filecharset - charsetisRequireLineEndingConvert - isRequireLineEndingConvertclientLineEnding - clientLineEndingpublic void update(java.lang.String str)
public void update(byte[] bytes)