public class ConcurrentMessageDigest extends Object
MessageDigest that does not make use
of ThreadLocal and - broadly - only creates enough MessageDigest objects
to satisfy the concurrency requirements.| Modifier and Type | Method and Description |
|---|---|
static byte[] |
digest(String algorithm,
byte[] input) |
static byte[] |
digestMD5(byte[] input) |
static void |
init(String algorithm)
Ensures that
digest(String, byte[]) and
#digestAsHex(String, byte[]) will support the specified
algorithm. |
public static byte[] digestMD5(byte[] input)
public static byte[] digest(String algorithm, byte[] input)
public static void init(String algorithm) throws NoSuchAlgorithmException
digest(String, byte[]) and
#digestAsHex(String, byte[]) will support the specified
algorithm. This method must be called and return successfully
before using digest(String, byte[]) or
#digestAsHex(String, byte[]).algorithm - The message digest algorithm to be supportedNoSuchAlgorithmException - If the algorithm is not supported by the
JVMCopyright © 2016 JBoss by Red Hat. All rights reserved.