Newer Version Available

This content describes an older version of this product. View Latest

Securing Your Data

You can secure your data by using the methods provided by the Crypto class.

The methods in the Crypto class provide standard algorithms for creating digests, message authentication codes, and signatures, as well as encrypting and decrypting information. These can be used for securing content in Salesforce, or for integrating with external services such as Google or Amazon WebServices (AWS).

Example Integrating Amazon WebServices

The following example demonstrates an integration of Amazon WebServices with Salesforce:

Example Encrypting and Decrypting

The following example uses the encryptWithManagedIV and decryptWithManagedIV methods, as well as the generateAesKey method of the Crypto class.

The following is an example of writing a unit test for the encryptWithManagedIV and decryptWithManagedIV Crypto methods.