I would study and understand the differences about these two technologies in Apex.

I know that in Two-Way SSL both the client and the server uses a certificate to "check" the other while whith Crypto class I can encrypting and decrypting information.

So, when I should use one rather then the other?

Thanks a lot!

1 Answer 1


You use SSL to secure data in motion, and the Crypto class to secure data at rest. Generally speaking, you want to secure communication between Salesforce and some other system, you use SSL; you can use Two-Way SSL as a means of authenticating yourself to the remote server (and vise versa) as well as securing the communication. If you want to store data somewhere in a secure form, use the Crypto class to encrypt the data, and to decrypt it later.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .