You need to sign in to do that
Don't have an account?
pcave_jr
AES private key
Is it possible to share an AES key between Salesforce and another application? I know there is the Crypto.generateAesKey() method, but I can't use that key in a PHP application to decrypt the data later. Is it possible to generate my own AES key from a string, then use that string as the AES key in both applications?
Hi, Did you find an answer? I'm also looking for a solution for this.
Thanks
You could do:
Blob key = Blob.valueOf('This is the key.....'); // Make it 16 Bytes or required
and then
String myStringToEncrypt = 'This is my String....'
Blob myBlobData = Blob.valueOf(myStringToEncrypt)
Blob myEncryptedString = Crypto.encryptWithManagedIV('AES256', key, myBlobData);
Anyone can help?
Not sure what other ways exist but I used the following code and just kept changing the text until the size of the blob was the desired size.