You need to use the base64Encode / base64Decode methods for the EnodingUtil class that Simon linked to. That enables you to base64 encode/decode data within your Apex code.
But what i am trying to do is i am calling a http req and while setting the client certificate, i am using base 64 encoder from an external website and copying it here. Now my Req is to directly encode it here instead of going to other website.
Httprequest req = new httpRequest();
req.setcertificate('...................encoded data from external website..,)
You need to use the base64Encode / base64Decode methods for the EnodingUtil class that Simon linked to. That enables you to base64 encode/decode data within your Apex code.
You need to use the base64Encode / base64Decode methods for the EnodingUtil class that Simon linked to. That enables you to base64 encode/decode data within your Apex code.
All Answers
See the encodingUtils class http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_encodingUtil.htm
Thanks SImon,
But what i am trying to do is i am calling a http req and while setting the client certificate, i am using base 64 encoder from an external website and copying it here. Now my Req is to directly encode it here instead of going to other website.
Httprequest req = new httpRequest();
req.setcertificate('...................encoded data from external website..,)
You need to use the base64Encode / base64Decode methods for the EnodingUtil class that Simon linked to. That enables you to base64 encode/decode data within your Apex code.