for an md5 macro, you must first add OverbyteicsMD5 in 'uses', optionally OverbyteicsSha1
then we add the necessary macros
in this case we take the opportunity to introduce the 64 and sha1 encoding macros available easily
But to satisfy the rebetto who loves the minimum evolution, we could make a variant allowing an evolution by grouping everything in a macro with various parameters but that could complicate the writing
{.encode|[md5,64,sha1,...]| ..... .}
{.decode|[64,...]| ..... .}
then we add the necessary macros
in this case we take the opportunity to introduce the 64 and sha1 encoding macros available easily
Code: [Select]
if name = 'encode md5' then // only for text strings, otherwise use 'md5 file' for binary files
result:=strMD5(p);
if name = 'encode sha1' then
result:=SHA1ofStr(p);
if name = 'encode 64' then
result:=base64encode(p);
if name = 'decode 64' then
result:=base64decode(p);
// just above these macros
if name = 'encodeuri' then
encodeuri();
if name = 'decodeuri' then
result:=decodeURL(p);
But to satisfy the rebetto who loves the minimum evolution, we could make a variant allowing an evolution by grouping everything in a macro with various parameters but that could complicate the writing
{.encode|[md5,64,sha1,...]| ..... .}
{.decode|[64,...]| ..... .}