The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
0answers
18 views

Should we give the guest user profile the “view encrypted data” permission?

We've developed native VF/Apex code that allows us to send a link to a customer and have them securely view a PDF of their contract (contract is a VF page generated using data from fields in their ...
2
votes
1answer
68 views

Has anyone got the OAuth 2.0 JWT Bearer Token Flow to work initiated from Apex code now 'RSA-SHA256' signing is available?

This year old thread Connect apex and Google API using JWT to retrieve Oauth 2.0 token was started before the Crypto class included the 'RSA-SHA256' signing algorithm. Now that this algorithm is ...
2
votes
2answers
51 views

Securely Storing a static API secret/key in a Salesforce app

I recently submitted an application to the AppExchange, only to have it not pass the security check due to "Insecure Storage of Sensitive Data Vulnerability." The problem is that my app accesses an ...
1
vote
0answers
46 views

Decode Signature

I've one signature field containing encoded values like 'iVBORw0KGgoAAAANSUhEUgAAApAAAACNCAYAAAAAYko8AAAAHGlET1QAAAACAAAAAA...' and i want to restore it back and put them into a list and display the ...
2
votes
0answers
49 views

Decrypt base64 signature

I have to decode a long Signature field value to generate signature image. Please find code below. Can someone help me here? public class AccountPDF111 { Public void AccountPDF111(){} Public ...
3
votes
0answers
22 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 ...
3
votes
0answers
44 views

Store Private/Public Key pair in a Custom Setting

I'm creating a digital signature for an integration and I've created a private/public key pair to sign the message. According to the Apex Crypto Class documentation, This private key should not ...
2
votes
1answer
179 views

Storing hash values (blob) in a string field?

I could sit and mess around with this but I really don't know the finer points of how cryptography works in Java/Apex to risk sitting on a security hole. Basically I'm creating a hash and then ...
4
votes
1answer
58 views

How to store a private key in a protected custom setting for use in Crypto class?

The Salesforce crypto class documentation specifies that a private key should be stored as a protected custom setting. "A PKCS8 formatted private key in base64 decoded form is required. This private ...
1
vote
0answers
42 views

Two-Way SSL Connection

I need to make a 2-way SSL connection to a particular service. In addition, the password for the service is a cryptographically signed long of the current datetime. In Salesforce, I can create a ...
0
votes
0answers
390 views

Input length must be multiple of 16 when decrypting with padded cipher

I am trying to get connect with FB. For that i have installed the FB tool provided by saleforce and working on it. When the code try to decryptWithManagedIV i am getting error Input length must be ...
1
vote
1answer
152 views

Invalid private key. Must be 32 bytes

I am trying to get connect with FB. For that i have installed the FB tool provided by saleforce and working on it. When the code try to decryptWithManagedIV i am getting error Invalid private ...
0
votes
0answers
42 views

Am i using the right encryption method for oauth 1.0

I am using oauth1.0 to connect to an external API from salesforce. I am using http://oauth.net/core/1.0/#nonce as reference point. To obtain a Request Token, the Consumer sends an HTTP request to ...
3
votes
2answers
2k 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 ...
5
votes
2answers
143 views

Workaround for AES decryption limit of 1 MB

We ran into the problem that obviously only 1 million byte (or 1MB) may be passed into the decrypt function. Does anybody know a workaround for this problem? There are JavaScript frameworks but they ...
5
votes
2answers
363 views

Verifying a signature in Apex

The apex crypto class is great but it appears to only be able to sign content. Is there any way to verify a signature in apex? I would expect a Crypto.verify() method but it doesn't appear to exist. I ...
6
votes
1answer
956 views

Connect apex and Google API using JWT to retrieve Oauth 2.0 token

I have been trying to connect Salesforce and Google API using server to server application. Intent :- To communicate data between Salesforce and Google Spreadsheet which is hosted in Google Sites ...
0
votes
1answer
558 views

Crypto Class & Private/Public Keys & Certificate

Has anyone used AES256 to encrypt and store Highly confidential data in force.com Database. What are the steps to follow? Help me with some insights into private/public keys and certificates, which of ...
2
votes
2answers
318 views

Salesforce OAuth and Client Network Configuration Changes

Can this be true that if we use Salesforce OAuth to grant login to a desktop app, then after validating and receiving tokens -> access, refresh etc) if client workstation switches Internet Connections ...
2
votes
1answer
680 views

Get first 16 Bytes from Blob object decoded from Base64

I have to call an external REST service and I have to decode the response. From external service documentation I think I have to decode the response with AES algorithm in this way: public static ...
2
votes
1answer
1k views

Why do I get 'PKIX path building failed' exception with my callout?

Error message :PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Hello all please see the above ...
1
vote
1answer
1k views

Oauth 1.0 oauth_signature generation and header creation for the authentication of external system

Can anybody help me with the oauth 1.0 oauth_signature generation from the client secret and consumer key? I have got client secret and consumer key along with the oauth token. Just need helping hand ...
3
votes
2answers
5k views

Sample Java class to decrypt AES128 encryption

Looking for some sample Java code that decrypts AES encrypted string. I'm trying to encrypt using Apex's Crypto class and decrypt using Java.
10
votes
1answer
787 views

Mimic MySQL AES_ENCRYPT in Apex

I am trying to mimic the MySQL AES_ENCRYPT function in Apex code. However the issue I am having is that MySQL doesn't use an initialization vector. Is there a way to replicate this behavior in Apex? ...