Package org.apache.tomcat.util.security
Class ConcurrentMessageDigest
- java.lang.Object
- 
- org.apache.tomcat.util.security.ConcurrentMessageDigest
 
- 
 public class ConcurrentMessageDigest extends java.lang.ObjectA thread safe wrapper aroundMessageDigestthat does not make use of ThreadLocal and - broadly - only creates enough MessageDigest objects to satisfy the concurrency requirements.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]digest(java.lang.String algorithm, byte[]... input)static byte[]digest(java.lang.String algorithm, int iterations, byte[]... input)static byte[]digestMD5(byte[]... input)static byte[]digestSHA1(byte[]... input)static voidinit(java.lang.String algorithm)Ensures thatdigest(String, byte[][])will support the specified algorithm.
 
- 
- 
- 
Method Detail- 
digestMD5public static byte[] digestMD5(byte[]... input) 
 - 
digestSHA1public static byte[] digestSHA1(byte[]... input) 
 - 
digestpublic static byte[] digest(java.lang.String algorithm, byte[]... input)
 - 
digestpublic static byte[] digest(java.lang.String algorithm, int iterations, byte[]... input)
 - 
initpublic static void init(java.lang.String algorithm) throws java.security.NoSuchAlgorithmExceptionEnsures thatdigest(String, byte[][])will support the specified algorithm. This method must be called and return successfully before usingdigest(String, byte[][]).- Parameters:
- algorithm- The message digest algorithm to be supported
- Throws:
- java.security.NoSuchAlgorithmException- If the algorithm is not supported by the JVM
 
 
- 
 
-