Skip to Content
0
Dec 20, 2022 at 04:47 AM

AES Encryption along with provided IV not supporting is not working in SAP.

584 Views Last edit Dec 30, 2022 at 03:20 AM 3 rev

Dear All,

We have to call the URL along with encrypted query parameters along with provided IV = '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' using 256 algorithm. But at the end when URL calls in browser am getting URL expired error with 302 status.

Am flowing the below steps.

1) Converted query parameter & private key from string to xstring

2) converted IV from char 32 to RAW16 and converted it to Xstring.

3) call method CL_SEC_SXML_WRITER=>ENCRYPT_IV using CO_AES256_ALGORITHM_PEM

4) call FM SCMS_BASE64_ENCODE_STR

5) call CL_HTTP_UTILITY=>IF_HTTP_UTILITY~ESCAPE_URL

6) concatenating the host & encrypted values and calling this final URL using FM CALL_BROWSER

The same encryption when other team is calling its working fine using C++.

Please suggest.

NOTE: the only difference between SAP & C++ is in C++ encryption method will take string values and encrypt it where as in SAP encryption method will take xstring values and encrypt.

Regards,

Shaik Shabeer Ahmed.