public class ConcurrentMessageDigest
extends java.lang.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(java.lang.String algorithm,
byte[]... input) |
static byte[] |
digestMD5(byte[]... input) |
static byte[] |
digestSHA1(byte[]... input) |
static void |
init(java.lang.String algorithm)
Ensures that
digest(String, byte[][]) will support the specified
algorithm. |
public static byte[] digestMD5(byte[]... input)
public static byte[] digestSHA1(byte[]... input)
public static byte[] digest(java.lang.String algorithm, byte[]... input)
public static void init(java.lang.String algorithm) throws java.security.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 supportedjava.security.NoSuchAlgorithmException
- If the algorithm is not supported by the
JVMCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.