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
irving wangirving wang 

RSA public key encryption

    I encountered a problem. Now there is a development requirement that I need to call other system interfaces in the opportunity trigger to transfer records to other systems.
    However, some parameters encrypted with the RSA public key need to be placed in the request header of the interface. I found out after looking at the documentation that apex doesn't provide a way to do RSA public key encryption directly.
    It seems that it can only be realized by using a java program to encrypt it?
VinayVinay (Salesforce Developers) 
Did you try checking with crypto class?

https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_restful_crypto.htm

Thanks,
irving wangirving wang
Yes, I checked this document. But it seems that there is only RSA signature method in it, no public key encryption method