Package org.apache.tomcat.util.security
Class ConcurrentMessageDigest
java.lang.Object
org.apache.tomcat.util.security.ConcurrentMessageDigest
A thread safe wrapper around 
MessageDigest that does not make use
 of ThreadLocal and - broadly - only creates enough MessageDigest objects
 to satisfy the concurrency requirements.- 
Method SummaryModifier and TypeMethodDescriptionstatic byte[]static byte[]static byte[]digestMD5(byte[]... input) static byte[]digestSHA1(byte[]... input) static voidEnsures thatdigest(String, byte[][])will support the specified algorithm.
- 
Method Details- 
digestMD5public static byte[] digestMD5(byte[]... input) 
- 
digestSHA1public static byte[] digestSHA1(byte[]... input) 
- 
digest
- 
digest
- 
initEnsures 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:
- NoSuchAlgorithmException- If the algorithm is not supported by the JVM
 
 
-