function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swati TaunkSwati Taunk 

RSA Encryption in Salesforce

Crypto (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_crypto.htm) class supports only AES algorithm for Encryption and Decrypion. I have a usecase where I need to encrypt my HTTP request payload using a certificate which supports RSA Encryption algorithm. 
So, should I write custom code to implement RSA encruption/Decryption algorithm? Is this the recommended approach/Best Practice? 
Malika Pathak 9Malika Pathak 9
Hi Swati,
This might help you

https://developer.salesforce.com/forums/?id=906F0000000D8eOIAS

Kindly mark this as the best answer, If you find this answer helpful.
irving wangirving wang
Hi Swati,

Did you finally solve this problem? It seems that I also encountered this problem.Could you please share the final code solution for the rsa public key encryption? 
I encountered this problem when calling other system interfaces. The request header of the interface needs to put the request parameters encrypted by RSA.
I would be very grateful if you could provide some advice!