Class ThreadSHA160
Provides a SHA-1 MessageDigest local to the current running Thread.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageDigestReturns a SHA-1 MessageDigest instance local to current Thread.protected MessageDigestReturns the current thread's "initial value" for this thread-local variable.Methods inherited from class ThreadLocal
get, remove, set, withInitial
-
Method Details
-
initialValue
Returns the current thread's "initial value" for this thread-local variable. This method will be invoked the first time a thread accesses the variable with theThreadLocal.get()method, unless the thread previously invoked theThreadLocal.set(T)method, in which case theinitialValuemethod will not be invoked for the thread. Normally, this method is invoked at most once per thread, but it may be invoked again in case of subsequent invocations ofThreadLocal.remove()followed byThreadLocal.get().- Overrides:
initialValuein classThreadLocal<MessageDigest>- Returns:
- the initial value for this thread-local.
- Throws:
InternalError- if an error occurs creating the initial value-
-
getInstance
Returns a SHA-1 MessageDigest instance local to current Thread.- Returns:
- a SHA-1 MessageDigest instance local to current Thread.
-