MD5 versus String Encoding

The result is supposed to be like this?

Do you maybe want EncodeHex(MD5("value")) ? Maybe adding a .Lowercase

Yep, if it’s to look like an MD5 you do that with lowercase.

  Dim myMD5 as String = "MyDataToBeHashed"
  MsgBox Lowercase(EncodeHex(MD5(myMD5)))

[quote=18123:@Rick A.]The result is supposed to be like this?
[/quote]
Yes - check the encoding and it’s probably NIL as and MD5 is just a run of bytes
THis is one of those spots where a “string” is being used as a “bunch of bytes”

Ok, I had the impression that the MD5 returned the usual “String” representation of a MD5, now I know that Xojo returns it’s binary, 128 bits (16 bytes) form. Hi Paul ( @Paul Lefebvre ) , make this a bit more clear in the docs, and as a plus cite this trick for getting the usual 32 hex lower case hash, please. :wink:

Thanks guys.