Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DES verification not working outside Eclipse

 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok this has me really confused. I have Eclipse Platform Version: 3.3.2 Build id: M20080221-1800 and I'm using this bit of code:



It works fine if run inside Eclipse, but fails if ran as a Jar.

This is the output from the Eclipse run.



Read public key from stream
MSG:%% REMOVED FOR SECURITY %%#4/17/09# # # ,MCwCFFvNWacws72u2bhKNXpOwedHvFqFAhRzcznQptP//gU37j+8JnN49H8yLQ==
Signature lenght :46
DSA result==true
269 [ main] INFO licensecontrol.LicensedContext - CTX:
278 [ main] INFO licensecontrol.LicensedContext - License is valid.


The output from the Jar is:


Read public key from stream
MSG:%% REMOVED FOR SECURITY %%#4/17/09# # # ,MCwCFFvNWacws72u2bhKNX
pOwedHvFqFAhRzcznQptP//gU37j+8JnN49H8yLQ==
Signature lenght :46
DSA result==false


Note that the line break is produced by the DOS command line and copied here.

Notice how the signature is the same, but it doesn't validate. Both runs are with the same Java version.

Any ideas?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic