The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

Encryptor class

The Encryptor helper class provides static helper methods for encrypting and decrypting strings using the hashes required by the SDK. It’s important for native apps to remember that all keys used by the Mobile SDK must be Base64-encoded. No other encryption patterns are accepted. Use the Encryptor class when creating hashes to ensure that you use the correct encoding.

Most Encryptor methods are for internal use, but apps are free to use this utility as needed. For example, if an app implements its own database, it can use Encryptor as a free encryption and decryption tool.