Encode/Decode base64 text

Hi there,


I've been looking for some base64 coding/decoding, the only thing I've found is:


do script "echo 'texthere' | openssl base64 -d"


The thing is that it works except for a word length limit, the word I'm trying to work with is very long (The sentence doesn't have spaces, but ampersands instead).


Is there any other Applescript method I can use?


Thank you very much

Posted on Dec 17, 2012 10:29 AM

Reply
4 replies

Dec 17, 2012 11:43 AM in response to xaruqui

The -d switch on the openssl base64 command enables debugging; it's the short version of the --debug switch. Probably not what you're after, either. The -D switch would be more typical, that's the short version of --decode switch, and probably what you had intended.


The -i (--input) and -o (--output) switches allow you to specify input and output files, which is one way to pass a whole lot of data into that command.


Do you have an example of some of the text that you're working with?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Encode/Decode base64 text

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.