• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

HMAC-MD5 hashing algorithm  RSS feed

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've also tried....
SecretKeySpec key = new SecretKeySpec( myKeyString.getBytes("ASCII"), "HmacMD5");

and I get the same results.....
 
B Wiley Snyder
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!