base64 & '='

Dave Cragg dcragg at lacscentre.co.uk
Mon May 29 06:29:55 EDT 2006


On 29 May 2006, at 10:14, sims wrote:

>
> When using base64Decode it seems that the '=' or '==' chars
> at the end of a base64Encoded string are inconsequential. It
> seems to make no difference if one '=', two '==' or none are at the
> end of the string being decoded.
>
> Is it safe to assume that any ending equal signs in a base64Encoded
> string do not have to be in that string when I decode it?

I've seen at least one base64 decode function (not Rev) where  
stripping a final "=" does affect the output. So, without official  
sanction from RunRev,  I'd be wary of assuming the way Rev handles  
incomplete encoded strings will remain the same in future versions.

But I take it you have a reason you want to drop the "=" characters.  
Otherwise, why bother?

Cheers
Dave




More information about the use-livecode mailing list