‎2016 Jan 11 6:30 AM
Hi Experts,
I have a requirement where a string needs to be encrypted based on key/pwd and later needs to decrypted with the same key/pwd in ABAP.
Below is the highlights of requirement.
Please suggest on how to achieve this in ABAP
Thanks,
Vijay
‎2016 Jan 11 7:10 AM
Hi,
Please check the class CL_HARD_WIRED_ENCRYPTOR.
Regards,
Taiyeb
‎2016 Jan 11 7:10 AM
Hi,
Please check the class CL_HARD_WIRED_ENCRYPTOR.
Regards,
Taiyeb
‎2016 Jan 11 7:17 AM
Hi,
I checked the class 'CL_HARD_WIRED_ENCRYPTOR' but this does not align with my requirements since the string is not encrypted with any custom/generated key/password.
Thanks,
Vijay
‎2016 Jan 11 8:49 AM
Hi,
I would suggest the following:
1. Generate the password using FM : RSEC_GENERATE_PASSWORD.
2. Create an FM ZENCRYPTxxxx passing the generated key/password and string .
3. In the ZENCRYPTxxxx FM call the method ENCRYPT_STRING2STRING (concat the key/pwd and string for the parameter) from the class cl_hard_wired_encryptor and get the encrypted string.
4. Store the key/password and encrypted string into your table.
5. Similarly create FM for decrypting and read from the table based on the password and use the decrypt_string2string from the cl_hard_wired_encryptor class.
Hope it helps.
Regards,
Taiyeb
‎2016 Jan 11 8:06 AM
‎2016 Jan 11 9:31 AM
Hi Vijay,
Please check below SCN link for Encryption and Decryption. But I suggest it will be good if you can get catch of any UNIX consultant and get developed UNIX script of this.