Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding public key to encrypted file

Former Member
0 Kudos
482

I am new to ABAP encryption and need some assistance. I have been trying to find a correct way to secure file before it is being sent to the recipient. I have used cl_hard_wired_encryptor to cipher my file but the only problem is that i do not know how to secure it using Public Key so that only those who have the key can access the file. Please correct me if this is not the way to go about this. I am willing to share my code which i used to encrypt file for farther corrections and assistance.  Thank you guys

3 REPLIES 3

Juwin
Active Contributor
0 Kudos
160

Encryption and Encoding are two different things. I don't think the methods in cl_hard_wired_encryptor accepts a key to encrypt the input string. Which means that the class is just encoding the input and not encrypting.

Have a look at the comments in Encryption & Decryption of data using ABAP | SCN

Thanks,

Juwin

Former Member
0 Kudos
160

I have gone thru the above discussion you shared and i cannot see much difference with my code. I would like to know how to use Public key encryption with that code so that once i send the file only people having the key can decry-pt it as compare to the above shared discussing which can be decrypted using any ABAP decrypt program.

ziolkowskib
Active Contributor
0 Kudos
160

Hi,

Please take a look at the following thread:

Please review standard SAP code mentioned above and copy it and adjust according to your needs. If you have any further questions please let us know.

BTW CL_HARD_WIRED_ENCRYPTOR should not be used for encrypting anything.