• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

MAC differs 1.3 vs 1.4

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am creating an MD5 Message Authentication Code to exchange with a third-party application. I need to get the MD5 token for the url string I pass to them. When I use JDK 1.4.2.01 the third-party accepts my security token. However; when I use JDK 1.3.1.09 and the optional JCE 1.2.2, the token is different for the same string, and gets rejected by the third-party.

Here is my 1.4.2 code:




Here is my 1.3.1 code



The byte array produced by the following line:
byte[] digest = mac.doFinal(dataBytes);
is apparantly incorrect with 1.3.1, but okay with 1.4.2.
Can anyone help me with this?
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic