Package cl.obcom.desktopfx.util
Class ThreadSHA160
Provides a SHA-1 MessageDigest local to the current running Thread.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageDigest
Returns a SHA-1 MessageDigest instance local to current Thread.protected MessageDigest
Returns the current thread's "initial value" for this thread-local variable.Methods inherited from class java.lang.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 theinitialValue
method 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:
initialValue
in 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.
-