Crypto Class in Salesforce
Provides methods for creating digests, message authentication codes, and signatures, as well as encrypting and decrypting information. Check the below link for more information https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_crypto.htm