Hi,
We have a legacy API which expects a key in payload. This key can be generated using below php code -
<?php $stringToEncode="SampleKeyStringToEncode"; $stringToEncode=str_pad(some Logic to calculate the length of padding and character to pad); echo (base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, "<AESkey>", $StringToEncode, MCRYPT_MODE_CBC, "<AESkey>" ) ));
How can we implement the same in Apigee?
Solved! Go to Solution.
You'd have to build a Java callout to perform that calculation.
There is a helpful hint here on this stackoverflow post.
You can start with the AES encryption callout , and modify it to perform mcrypt.
AES is not the same as MCRYPT Rijndael, but ... they're related and pretty close.
You'd have to build a Java callout to perform that calculation.
There is a helpful hint here on this stackoverflow post.
You can start with the AES encryption callout , and modify it to perform mcrypt.
AES is not the same as MCRYPT Rijndael, but ... they're related and pretty close.
Thanks @Dino ,I am able to do this using java callout.
GREAT; Glad to hear it.