public final class Digester extends Object
MessageDigest
as
underlying mechanism.Modifier and Type | Method and Description |
---|---|
String |
digestHex()
Returns the hex representation of the digest of all data that has been provided so far.
|
static String |
md5Hex(String input)
Utility method that creates a hex string of the MD5 hash of the given
input |
static Digester |
newInstance(String algorithm)
Creates a new Digester instance for the given
algorithm . |
static Digester |
newMD5Instance()
Creates a new Digester instance for the MD5 Algorithm
|
Digester |
update(byte[] additionalData)
Update the Digester with given
additionalData . |
public static Digester newInstance(String algorithm)
algorithm
.algorithm
- The algorithm to use, e.g. "MD5"public static Digester newMD5Instance()
public static String md5Hex(String input)
input
input
- The value to create a MD5 hash forinput
public Digester update(byte[] additionalData)
additionalData
.additionalData
- The data to add to the digest sourcethis
for method chainingpublic String digestHex()
update(byte[])
Copyright © 2010–2018. All rights reserved.