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.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[])
will support the specified
algorithm. This method must be called and return successfully
before using digest(String, byte[])
.algorithm
- The message digest algorithm to be supportedNoSuchAlgorithmException
- If the algorithm is not supported by the
JVMCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.