Questions tagged [encryption]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
12
votes
2answers
19k views

How to encrypt and decrypt a String in Apex using the Crypto class

Please provide apex code examples to encrypt and decrypt a string using all of the supported encryption algorithms (AES128, AES192, and AES256). I searched for clear and concise code examples on this ...
12
votes
1answer
392 views

What is the performance penalty for Deterministic Platform Encryption?

Spring 18 included a beta release of deterministic encryption for the SFDC Shield Platform Encryption product. Deterministic encryption imposes fewer issues with your existing code base / metadata ...
11
votes
1answer
316 views

What's the pattern for Platform Encryption field mask length?

I've enabled Platform Encryption on standard Account and Contact fields, as well as on custom fields. In general masked field values are displayed as 5 asterisks (*****), but there are some exceptions:...
10
votes
1answer
3k views

SHA1 Hash Results

I am trying to encryption a string using SHA1 encryption. Test string The quick brown fox jumps over the lazy dog 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 (encryption token) You can validate ...
10
votes
2answers
401 views

Is web to lead form data submits in encrypted form?

I want to know that when web to lead form is submitted into salesforce, if the data in that form is encrypted or not. I want to know that how much security is applied on web to lead? I want to ...
9
votes
1answer
151 views

How to hide username and password in log file when using CLI DataLoader?

When using the Dataloader command-line, if the value of parameter sfdc.debugMessages is defined as TRUE then debugging SOAP messages are captured. In the log file generated I can see both the user and ...
8
votes
1answer
411 views

Is this an expected behavior? Encrypted Text visibility

I would like to know how it works the encrypted text visibility in apex code. In some classes I'm able to see the unmasked text field but in others I see 'XXXXXXXX' when I use System.debug. I'm using ...
7
votes
3answers
614 views

Platform Encryption vs. FLS

What would I get from Platform Encryption that I cannot get from Field Level Security? We are investigating whether or not to invest in Salesforce Shield, so I want to better understand the ...
7
votes
1answer
455 views

Are encrypted fields not masked in Visualforce however the “View Encrypted Data” permission is set?

In an org where Contact.Name is encrypted via Salesforce Shield Platform Encryption and for an SA user (where the SA profile has "View Encrypted Data" unchecked) normal list views and detail pages ...
6
votes
1answer
229 views

Deploy V42 (beta) Deterministic Platform Encryption

Use case Source org: V42, deterministic platform encryption enabled and set for these fields: Contact.MailingAddress Contact.Phone By using Force.com IDE, ant, or other deployment tool (e.g. ...
6
votes
2answers
1k views

Integer Array to Base64 String

So I am struggling a bit to convert some code written in java to APEX. The struggle here is that I have an integer array as one of my encryption key, it looks something similar to this below: [242, 2,...
6
votes
1answer
1k views

Lightning Components and Encrypted Fields

I have a simple lightning component that tests that encrypted fields are not checked against for security before returning to the UI. This means that users without the View Encrypted Data permission ...
6
votes
1answer
521 views

How are Master Encryption Keys being stored?

What storage methods does Salesforce use to store Master Encryption Keys? For example, are the master keys stored in some type of secure key store? If so, what methods does it use to ensure the keys ...
6
votes
1answer
326 views

Master Encryption Key 1 has already been deleted

I am trying to upsert to Salesforce using PartnerConnection SOAP API. I have no records in my custom object and get the following error when I upsert a new record: Master Encryption Key 1 has ...
5
votes
2answers
357 views

What is the best way to include AES Encryption private key in a Managed App (with Security Review Passing)?

I'm trying to get an app pass Security Review, but the review team has identified that the key phrase being used is insecure storage mechanism. What I did was, I simply put the key in string ...
5
votes
3answers
2k views

Encrypt a Visualforce URL Param

I have a VF page that I pass in parameters to such as Contact Id. As such, I don't want people clicking the links to see the actual Id since that doesn't seem very secure. So I build a simple ...
5
votes
0answers
120 views

SFMC public key missing `encrypt` flags?

The ExactTarget SFMC Public Key referred to in their FTP instruction guide points to a key that doesn't seem to be set up properly for encryption of FTP files. $ curl https://members.exacttarget.com/...
4
votes
1answer
214 views

Creating an encrypted text field through metadata deployment - invalid length, maximum is: 255

I defined an encrypted text field with a length of 255 and deployed it to my org. <fields> <fullName>Field__c</fullName> <externalId>false</externalId> <...
4
votes
1answer
191 views

Reading into Shield Encrypted Fields from Salesforce Marketing Cloud

We are currently integrated with the core platform through marketing cloud connect and we are using salesforce data as an entry source in most of our journeys. My question is, if we were to go with ...
4
votes
2answers
1k views

Decrypting Salesforce Encrypted Fields

I'm storing user passwords for an external web service in salesforce, in encrypted fields. Using the SOAP API in JavaScript, I wish to use the password in a REST request. However, I'm unable to ...
4
votes
2answers
280 views

Encrypted fields creation limit

Can someone please let me know, if there any limit for number of encrypted fields allowed per object or per per org?
4
votes
2answers
2k views

Decrypt a string encrypted by the EncryptSymmetric() AMPscript function using PHP

I read elsewhere in StackExchange that it's not possible to decrypt AES strings originating from AMPScript in PHP. Is this true? It seems that it should be possible with mcrypt. Also, part two for ...
4
votes
2answers
4k views

Encryption and Decryption in salesforce

It is working for some records it is showing up the above error for some records it showing up the following error Input length must be multiple of 16 when decrypting with padded cipher ...
3
votes
2answers
303 views

Has anyone enabled Transparent Data Encryption (TDE) in Marketing Cloud?

I've submitted a support ticket to enable Transparent Data Encryption (TDE) on a Marketing Cloud instance. Since all of the encryption happens on the backend as opposed to Field Level Encryption (FLE) ...
3
votes
1answer
225 views

How will Salesforce's move to SHA-256 for certs impact Mobile SDK users?

Is Mobile SDK 3.0 compatible with the new SSL certificates coming out later this year? If not, what changes should be applied by iOS users of the Mobile SDK? EDIT: Thanks to Gaurav below for this ...
3
votes
1answer
93 views

Search affected by encryption?

If I choose to use case insensitive deterministic encryption on first and last name for the account and contact object, in addition to encrypting search indexes....should I have any problem searching ...
3
votes
2answers
228 views

Passing encrypted email in url string for Commerce Cloud - Key Management

I need to utilize the encryptsymmetric ampscript function to pass an email through to Commerce Cloud that is encrypted. The guys on commerce cloud have generated a private and public key. I cannot ...
3
votes
1answer
2k views

EncryptSymmetric AMPScript AES

We want to encrypt / encode URL parameters on our pages. I tried to encrypt a parameter using EncryptSymmetric() with AES algorithm as explained in the documentation %%[SET @encData=EncryptSymmetric("...
3
votes
1answer
109 views

Encrypt unique ID in URL to Marketing Cloud Custom Preference Center Page from SF Commerce Cloud

I have a marketing cloud custom preference center cloud page posting and retrieving information directly from Sales Cloud based on Contact ID. The page is accessible only via email. But we would like ...
3
votes
2answers
86 views

Dash Characters in Case Sensitive Deterministic Encryption Not Returned in SOQL

I am experiencing some unexpected results when querying a on a text field that is using Case Sensitive Deterministic Encryption. The field can contain dashes - in the string, when I use an exact ...
3
votes
1answer
104 views

Encryption / decryption with AES

I have an integration with another system which I should use the AES Algorithm.The Encryption is made in SF side - and sent in the header of an HTTP request. This made to recognize SF in internal ...
3
votes
1answer
2k views

Salesforce disabled TLS 1.0 encryption

Could you please help me with this issue? Actually SF uses TLS 1.0 encryption for the communication between the external app and the platform. But regarding to the last communication of SF this ...
3
votes
1answer
222 views

Encrypted DOB field shows original value in VF Page

I have a custom DOB field which is platform encrypted. I can see the field value as '7/7/1777' in standard layouts and in highlights panel in console. But when the field is used in a VF page it ...
3
votes
1answer
1k views

How to compare salesforce custom encrypted text field with user input in customer portal site?

I have an encrypted text field on the Contact object. How can I compare this date of birth field with user input from site page? In Layout Configuration Input
3
votes
1answer
77 views

hmacSHA1 Encryption Question

Does anyone know whether the crypto.generateMAC function generates a hmacSHA1 encrypted in binary or hexidecimal?
3
votes
1answer
83 views

Replicating a “Click to Reveal” link

I'm currently trying to replicate the functionality of Connected App's Consumer Secret. Just as a reference, the field looks like this when you first open a Connected App (Setup > Apps > Connected ...
3
votes
0answers
324 views

How to convert text field to encrypted when referenced in multiple places? New approach?

We have a text field that is referenced several hundred times in all code, validation rules, WFRs, etc that we'd like to encrypt now. In order to do that, seems like we need to delete it and recreate ...
3
votes
1answer
55 views

Any work-around for the lack of XMLSignature implementations?

As explained in this unimplemented for 4 years idea, Apex does not expose any XMLSignature implementations that could be used for example to validate the X509 signature on some XML. So: Does Apex ...
2
votes
2answers
406 views

Way to see all encrypted fields in Salesforce?

I was looking for a way to see what fields in an org are encrypted. I am aware of the encryption statistics, however I was hoping there was a way where I could do a SOQL query and return all the ...
2
votes
1answer
1k views

How can I mask sensitive data in sandbox?

I want to mask the account name of the account object, so that the user cannot view the account name. How can I do this? Please provide me some suggestions. I want this type of pattern
2
votes
1answer
52 views

SSJS equivalent of DecryptSymmetric

Knowing that we have EncryptSymmetric and DecryptSymmetric in Ampscript, both with the ability of referencing password, vector and salt, from Key Management - is there anything similar in SSJS? If a ...
2
votes
1answer
574 views

Compare Encryption: Apex Differs From Java?

I am converting Java code to apex. Purpose of the code is to encrypt . But apex is not giving the same result as java. Could someone help me to fix the code. Java Code: import javax.crypto.Cipher; ...
2
votes
1answer
1k views

Error while encrypting

I am getting the below error while encrypting data. System.InvalidParameterValueException: Invalid private key. Must be 16 bytes.: Class.System.Crypto.encryptWithManagedIV: line 50, column 1 Here ...
2
votes
1answer
57 views

Standard Subscription Center query string encoding

I have been trying to figure out this use case, unfortunately without success: A person logs into a portal (client's own portal, nothing to do with any of the Salesforce platforms) and they have ...
2
votes
2answers
455 views

How can I test to see if a field is encrypted using Shield Platform Encryption?

If I encrypt fields with the Platform Shield Encryption, but still see the fields when I'm a different user how can I test to see if the encryption is working? I understand it encrypts at rest so I ...
2
votes
1answer
887 views

Encrypting SFMC email link parameter values

The email address of the subscriber is currently appended as a parameter to our SFMC email links. Rather than have the email as raw text, we would like to encrypt the value. For example, the link url ...
2
votes
1answer
2k views

Issue in generating Digest for SHA256

I have an API Integration which expects a SHA256/HMAC message digest encoded Signature. It also provides an example that if message body = 'testmessage' secret key = '123456789' Signature: ...
2
votes
1answer
40 views

Storing Encrypted Voucher Codes in Marketing Cloud

We are using a lot of vouchers in our marketing campaigns and usually, vouchers are uniquely assigned to a specific user when they are being issued on the back-end, and therefore no other user can ...
2
votes
1answer
34 views

Custom Meta Data - Hacking security

Is it secure to set as custom meta data, for example, Credit card details or any other sensitive data? Is there any existing option to encrypt this data ?
2
votes
1answer
1k views

Crypto Class Error: “pad block corrupted”

Created a class for encrypting and decrypting values. It's throwing an error about the 'pad block corrupted' being incomplete. This works for me: Blob ckey = EncodingUtil.base64Decode(...