aspose file tools*
The moose likes Java in General and the fly likes HMAC-MD5 hashing algorithm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "HMAC-MD5 hashing algorithm" Watch "HMAC-MD5 hashing algorithm" New topic
Author

HMAC-MD5 hashing algorithm

B Wiley Snyder
Ranch Hand

Joined: Nov 26, 2003
Posts: 50
Hello I'm semi successfull at finally creating this algorithm and running it againts the variables I need to. But it doesn't seem to be a true HMAC-MD5 hash...

The successfull hash I create with an ASP script that works and plugs into my gateway looks like this...
f81633aec015f23fbfd57bec77529c31

The one I create with the following code looks like this and has a trailing == in every one?
JN4Kuk4KFN6pO/XA/wdAWg==

Can anyone lend a hand pleeeeeeeeese...


B Wiley Snyder
Ranch Hand

Joined: Nov 26, 2003
Posts: 50
I've also tried....
SecretKeySpec key = new SecretKeySpec( myKeyString.getBytes("ASCII"), "HmacMD5");

and I get the same results.....
B Wiley Snyder
Ranch Hand

Joined: Nov 26, 2003
Posts: 50
I think I have narrowed it down to this........ could someone atleast help me with finding out what other encoding methods I can use besides this...

String digestB64 = new sun.misc.BASE64Encoder().encode(digest);

Base64encoder?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HMAC-MD5 hashing algorithm