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
mahesh chandramahesh chandra 

How to verify if a field has been encrypted using Shield platform encryption

Even after enabling Shield platform encryption for a field, say, Account Name, the Name of an account is shown in plain text.
View Encrypted Data permission has not been given to the user.
According to https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_security_pe_masking.htm encrypted fields will no longer be msked.
So is there any way, if the field value is getting encrypted or not?
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Mahesh Chandra,

Make sure that your organization has an active encryption key. If you’re not sure, check with your administrator.
  1. From Setup, use the Quick Find box to find the Platform Encryption setup page.
  2. Click Encrypt Fields.
  3. Click Edit.
  4. Select the fields you want to encrypt, and save your settings.
Please refer the below link for reference. I hope it will be helpful.
Please mark it as best answer if the information is informative.

Thanks
Rahul
 
Abhishek Shukla 53Abhishek Shukla 53
Hi Mahesh Chandra,

Did you get the answer for your query? I have the same question however everywhere I just get the steps to encrypt fields.

I am interested to know that how can I see the evidence of data in the field is actually encrypted considering encrypted fields are no longer masked post spring 17 release.

Thanks,
Abhishek
PuneetGautamPuneetGautam
Hi Mahesh,

If it is your personal org you cant try to encrypt field using the key.
  • Create new record after encryption enablement.
  • export key and save it. 
  • Generate one more key
  • delete older key
  • check record data it should be some garbage value. 
  • reimport key (status is archived now)  and you will be able to see data. 
-Puneet
Altaf Ahmed 7Altaf Ahmed 7
Hi Mahesh,

As per Shield Platform Encryption, data at rest is encrypted and Salesforce has turned off the masking. Only way to check the field is encrypted or not is to go to custom fiels and check whether encrypted check box is checked or not, for standard fields- you need to go platform encryption-->encryption policy-->encrypt fields. As per the last release of salesforce you check the percentage of data encrypted, for this you need to go to  platform encryption-->encryption statistics and check over there.

In other words, there will be no masking in shield platform encryption.

Hope this helps.

-Altaf
Sidrit RekaSidrit Reka

What about the data you get from SOAP or REST API calls, are they encrupted too?

 

Thank you in advance!

Zac HZac H
From API v31.0, I have been able to use the field describe in Apex to check isEncrypted(). This is my first answer on developer forums, but this has helped me when building queries dynamically to avoid errors, and identify when I should uses SOSL/Paramaterized search instead of SOQL etc. when working with REST api.