The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
132 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
37 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
24 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
166 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
95 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
29 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 ...
2
votes
2answers
1k 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
133 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 ...
3
votes
1answer
256 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
837 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
474 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
289 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
606 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 ...
1
vote
1answer
953 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
991 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
4k 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
681 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? ...