Bookmark Topic Watch Topic
  • New Topic

APOP .. ?

 
Foo mIKE
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
i am trying to calculate a md5 digest(example from RFC 1939) but can't get the same result they got ;-( .


code:

String pass="<1896.697170952@dbc.mtview.ca.us>tanstaaf";
byte [] b=pass.getBytes();
try{
MessageDigest md5 = MessageDigest.getInstance("MD5");
//md5.update(b,0,b.length);
byte [] foo=md5.digest(b);
System.out.println("Digest :"+foo);
}catch(NoSuchAlgorithmException e){}



I got : Digest : [B@df6ccd

They got : c4c9334bac560ecc979e58001b3e22fb

How did they get it?

Any help would be appreciated .
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
Foo mIKE,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a duplicate post.

Round these parts, posting the same question in multiple forums is bad practice. It can make it rather difficult to follow a conversation, plus folks spend time saying things that were just said.

Please continue over in the Intermediate forum...
 
    Bookmark Topic Watch Topic
  • New Topic