@Immutable public final class MessageDigestValue extends Object
| Constructor and Description |
|---|
MessageDigestValue(EMessageDigestAlgorithm eAlgorithm,
byte[] aDigestBytes) |
| Modifier and Type | Method and Description |
|---|---|
static MessageDigestValue |
create(byte[] aBytes,
EMessageDigestAlgorithm eAlgorithm)
Create a new
MessageDigestValue object based on the passed source
byte array |
boolean |
equals(Object o) |
EMessageDigestAlgorithm |
getAlgorithm() |
byte[] |
getDigestBytes() |
String |
getDigestString() |
int |
hashCode() |
String |
toString() |
void |
writeDigestBytes(OutputStream aOS)
Write the digest bytes to the specified output stream.
|
public MessageDigestValue(@Nonnull EMessageDigestAlgorithm eAlgorithm, @Nonnull @Nonempty byte[] aDigestBytes)
@Nonnull public EMessageDigestAlgorithm getAlgorithm()
null.@Nonnull @Nonempty @ReturnsMutableCopy public byte[] getDigestBytes()
null.public void writeDigestBytes(@Nonnull @WillNotClose OutputStream aOS) throws IOException
aOS - The output stream to write to. May not be null.IOException - In case of a write error@Nonnull @Nonempty public String getDigestString()
null.@Nonnull public static MessageDigestValue create(@Nonnull byte[] aBytes, @Nonnull EMessageDigestAlgorithm eAlgorithm)
MessageDigestValue object based on the passed source
byte arrayaBytes - The byte array to create the hash value from. May not be
null.eAlgorithm - The algorithm to be used. May not be null.null.Copyright © 2014–2016 Philip Helger. All rights reserved.