[jboss-user] [JBoss AOP] - Problem with MessageDigest usage in MethodHashing

y360 c do-not-reply at jboss.com
Tue Mar 6 08:33:23 EST 2012


y360 c [https://community.jboss.org/people/y360c] created the discussion

"Problem with MessageDigest usage in MethodHashing"

To view the discussion, visit: https://community.jboss.org/message/721815#721815

--------------------------------------------------------------
In class MethodHashing there is code that uses MessageDigest as follows

MessageDigest.getInstance("SHA")

This works fine with Sun JCE where SHA is defined as an alias to the standard algorithm name SHA-1, but I need to use a different JCE provider that does not have the alias.

I quote from sun JCE docuemnt:
"Some providers may choose to also include alias names that also refer to the same algorithm. For example, the "SHA-1" algorithm might be referred to as "SHA1". Applications should use standard names instead of an alias, as not all providers may alias algorithm names in the same way."

For MessageDigest standard names are listed in:
 http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#MessageDigest http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#MessageDigest
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/721815#721815]

Start a new discussion in JBoss AOP at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120306/df19527b/attachment-0001.html 


More information about the jboss-user mailing list