Re: Which char is NOT in result MD5Digest

2010-04-05 Thread Claudi Cornaz

Hi Richard and Dave,

Thanks for the answers. It works like a charm.
Not something I would have found in a long long time.

Anyway back to coding again.

Claudi




On 3 apr 2010, at 17:28, Richard Gaskin wrote:


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
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Which char is NOT in result MD5Digest

2010-04-03 Thread Claudi Cornaz


Hi all you wizards,

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?


TIA
 Claudi

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Which char is NOT in result MD5Digest

2010-04-03 Thread Richard Gaskin

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
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Which char is NOT in result MD5Digest

2010-04-03 Thread Dave Cragg
Following Richard's suggestion, 

I think a lot of people convert the output of the md5Digest function to hex:

function hexDigest pvalue
  local tRes
  put md5Digest(pValue) into tMD5
  get binaryDecode(H*,tMD5,tRes)
  return tRes
end hexDigest

This will contain only digits and the characters a-f.

In addition, it matches the md5 digests widely used by other programs.


Cheers
Dave



On 3 Apr 2010, at 16:08, Claudi Cornaz wrote:

 
 Hi all you wizards,
 
 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?
 
 TIA
 Claudi
 
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution