Quantcast
Viewing all articles
Browse latest Browse all 2823

ABAP - Encrypting using PKCS7 (SSF functions)

Hi all,

I am developing a code to make the output result of a String input value as a valid parameter in an external URL.

Therefore I found that to do such an encryption one should use SSF functions, and as much as I could understand the order of using this should be the folowing:

 

1 - Using the STRUST t-code, one should upload the PSE certifications of wich include the public key that will be used in the encryption.

2 - Convert string value to Xstring (Function: SCMS_STRING_TO_XSTRING)

3 - Convert Xstring value to Binary table (Function: SCMS_XSTRING_TO_BINARY)

4 - Getting some parameter using (Funtion : SSFPSE_LOAD) and passing PSE name.

5 - Encrypt data using Function SSF_KRN_ENVELOPE

6 - Convert the output data table from Binary to String value ( Function  SCMS_BINARY_TO_STRING).

 

Applying these criteria, unfortunatly I still not able to do the work, and actually I have more doubt about these mentioned steps. Actually the the input table that we prepare by the use of SCMS_XSTRING_TO_BINARY doesn't seem as binary values, I think it's more like hexadecimal values and the same for the values in the output table. moreover for the URL usage one should pay a special attention to some charecter that won't be allowed to be used there, so one need maybe to look for a method to convert the result to such an acceptable values (as UTF-8).

 

Please can you addvice how to do this or if someone has allready done somthing similar I will appreciate If he can provide me with the code.

 

Many thanks.


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>