Well maybe someone finds this useful too...

How do I reverse the following operation:

     get binaryDecode("H*", someBinaryData, tHexDigest)

With binaryEncode:

     ???

I have this function I have been using for a while:

function textFingerPrint someText
  local tHexDigest
  put md5digest(someText) into someBinaryData
  get binaryDecode("H*", someBinaryData, tHexDigest)
  return tHexDigest
end textFingerPrint

So I have two questions - why is:

      get binaryDecode("H*", someBinaryData, tHexDigest)

better than using:

    put base64Encode(someBinaryData) into someText

If i am thinking of using the resulting text as a file name? Output can include "+, /, and =" - but that is OK no?

I want to be able to get back to the raw binary data....


NB thanks to Alex Tweedly I am using the not quite cross platform:

function shell_Md5Hash someFile
  put "md5 -q" && shell_EscapeFile(someFile) into someShell
  return shell(someShell)
end shell_Md5Hash

Instead of revs md5Hash....


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to