You need to sign in to do that
Don't have an account?
sivaext
decrypt challenge in salesforce from external system
We have integrating salesforce with external system. External system have two factor authetication process.
Step1 : We are calling first URL to get challenge. - Working fine.
Step2 : We need to decrypt challenge in step2. We have an issues to decrypt the challenge, the error is "InValid parameter exception, private key must have 16 bytes" .
String challenge = 'NdqeqeqYQVyWaq0jYyB71Odhog==';
blob challenge1 = EncodingUtil.base64Decode(challenge);
String mkey = 'zxvfg12';// client ask to convert into 16bytes but salesforce doesn't support.
blob base64key = EncodingUtil.base64Decode(mpin);
Blob decrypted = Crypto.decryptWithManagedIV('AES128', base64key, challenge1);
system.debug('.......'+decrypted);
String decryptedString = decrypted.toString();
System.debug('......'+decryptedString);
Thanks in Advance.
Siva.
Step1 : We are calling first URL to get challenge. - Working fine.
Step2 : We need to decrypt challenge in step2. We have an issues to decrypt the challenge, the error is "InValid parameter exception, private key must have 16 bytes" .
String challenge = 'NdqeqeqYQVyWaq0jYyB71Odhog==';
blob challenge1 = EncodingUtil.base64Decode(challenge);
String mkey = 'zxvfg12';// client ask to convert into 16bytes but salesforce doesn't support.
blob base64key = EncodingUtil.base64Decode(mpin);
Blob decrypted = Crypto.decryptWithManagedIV('AES128', base64key, challenge1);
system.debug('.......'+decrypted);
String decryptedString = decrypted.toString();
System.debug('......'+decryptedString);
Thanks in Advance.
Siva.
AES128 algorithms
AES192 algorithms
AES256 algorithms