Thread safety and java.security.MessageDigest
"Richard S.Martin" <[email protected]> Wed, 1 May 2002 11:32:23 +0000
| Newsgroups | gmane.comp.windows.devel.java.security |
|---|---|
| Organization | Magex |
| Message-ID | <[email protected]> |
Has anyone noticed the lack of Thread safety in the MessageDigest class? When throwing loads of simulaneous requests at it I was finding about 40 errors per 100,000 calls. So I stuck it in a synchronized block expecting to solve the problem but suffer a performance hit. The wierd thing was that with the synchronized block, the average time per call reduced to about 60% of what it was before. Can anyone explain this? I was using the default Sun implementation of the MD5 digest. Rich ============================================================================== This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. All information is the view of the individual and not necessarily the company. If you are not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication and its attachments is strictly prohibited. If you have received this email in error please notify: [email protected] ============================================================================== You can read messages from the JAVA-SECURITY archive, unsubscribe from JAVA-SECURITY, or subscribe to other DevelopMentor lists at http://discuss.develop.com.