You need to sign in to do that
Don't have an account?
karimulla testing
ENCRYPTION IN SALESFORCE
(Encrpting with key "1234567890123456" it is getting encrpted):
Blob key = Blob.valueOf('1234567890123456'); //WITH 16BYTES
String myStringToEncrypt = 'This is my String....'
Blob myBlobData = Blob.valueOf(myStringToEncrypt)
Blob myEncryptedString = Crypto.encryptWithManagedIV('AES256', key, myBlobData)
(Encrpting with key "INDIA" it is not getting encrpted) :
SHOWING ERROR: Invalid private key. Must be 16 bytes.
Blob key = Blob.valueOf('INDIA'); //
String myStringToEncrypt = 'This is my String....'
Blob myBlobData = Blob.valueOf(myStringToEncrypt)
Blob myEncryptedString = Crypto.encryptWithManagedIV('AES256', key, myBlobData)
/// I KNOW THAT IT SHOULD BE 16 BYTES REQUIRED
//////bt in .net application they used the key "INDIA" and encrpted with 'AES256'.. need samekey "INDIA" in salesforce ...MAY I GET THE SOLUTION
Blob key = Blob.valueOf('1234567890123456'); //WITH 16BYTES
String myStringToEncrypt = 'This is my String....'
Blob myBlobData = Blob.valueOf(myStringToEncrypt)
Blob myEncryptedString = Crypto.encryptWithManagedIV('AES256', key, myBlobData)
(Encrpting with key "INDIA" it is not getting encrpted) :
SHOWING ERROR: Invalid private key. Must be 16 bytes.
Blob key = Blob.valueOf('INDIA'); //
String myStringToEncrypt = 'This is my String....'
Blob myBlobData = Blob.valueOf(myStringToEncrypt)
Blob myEncryptedString = Crypto.encryptWithManagedIV('AES256', key, myBlobData)
/// I KNOW THAT IT SHOULD BE 16 BYTES REQUIRED
//////bt in .net application they used the key "INDIA" and encrpted with 'AES256'.. need samekey "INDIA" in salesforce ...MAY I GET THE SOLUTION
You can refer below link for similar discussion.
https://developer.salesforce.com/forums/?id=906F00000008yfxIAA
Please mark it as Solved if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards
Sandhya