Which char is NOT in result MD5Digest

Richard Gaskin ambassador at fourthworld.com
Sat Apr 3 11:28:39 EDT 2010


Claudi Cornaz wrote:

> Is there a character that won't be in the result of the MD5Digest?
>
> I try to ceate a list of control id's a comma and the MD5Digest of the
> script of that control.
> Unfortunatly the cr character can be part of the resulting MD5 thus
> throwing of my lines with a part of the MD5.
>
> Now of course I can replace the cr but which char to use? I need one
> that for sure isn't returned by the MD5.
> Or differently: how can I keep my control id's and corresponding MD5
> seperated from each other in a list, to get at each in turn?

If you can deal with a string that's a bit longer, you could 
base64-encode the MD5 digest:

  put base64Encode(md5Digest(tMyString))

That'll result in a string using only a relatively small subset of ASCII 
characters, leaving most common delimiters (commas, tabs, etc.) free for 
you to use however you like.

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv



More information about the use-livecode mailing list