Skip to Content
author's profile photo Former Member
Former Member

Adding public key to encrypted file

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Aug 15, 2016 at 03:46 PM

    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



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Posted on Aug 16, 2016 at 09:11 AM


    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.