Removing linebreaks from base64encoded string

Martin Koob mkoob at
Sat Sep 10 09:31:21 EDT 2011

Hi Mark

I am working on a way to have browser based uploads to Amazon S3 buckets.  
As part of the upload form you need a policy in JSON format that is base64
encoded then signed using hmacSha1 that signature is then then base64

Following that recipe, and using LiveCode's base64encode() function, the
signature I created did not match the one calculated by the S3 service.   I
then read that you had to strip the linebreaks from the base64 encoded JSON

When I stripped the linebreaks of the initial base64 encoding of the JSON
policy using the script that Michael suggested the signature was accepted by
Amazon.  I did not have to strip the linebreaks from the base64 encoded
hmacsha1 signature.

Thanks again for the help Michael.


View this message in context:
Sent from the Revolution - User mailing list archive at

More information about the Use-livecode mailing list