You need to sign in to do that
Don't have an account?
cstephens
Base 64 Encode
I'm currently writing a mashup between my company's service and salesforce and I need to encode the data which I am sending to our service in base64, but I can't seem to figure out how to do this in Apex. Can someone please point me in the correct direction.
Thanks
Actual solution to my issue is this:
String myBase64String = EncodingUtil.base64Encode(Blob.valueof(myString));
thanks for pointing me in the right direction.
All Answers
There is plenty on this in the Apex Code documentation. Have a look in there before starting a new thread, good luck.
See EncodingUtils http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_restful_encodingUtil.htm
Thank you Simon, this is what I was attempting to do, but I didn't find the actual doc page for the EncodingUtils.... Problem I was having was that I was attempting to send a String to the function, and it takes a blob.... Now I need to figure out how to convert my string data into a blob....
Actual solution to my issue is this:
String myBase64String = EncodingUtil.base64Encode(Blob.valueof(myString));
thanks for pointing me in the right direction.