‎2011 May 02 11:03 AM
Hi,
I need to encode the values in the fields of the data base table and again i need to put the encoded data into that data base table back and i need to decode the data base table back.
Are there any fm's for this?
Please suggest me a approch of doing this.
Thanks in advance,
Radhika
‎2011 May 02 11:25 AM
‎2011 May 02 11:39 AM
Hi Francois,
I checked the methods in the class CL_HARD_WIRED_ENCRYPTOR.
But, in my case the ecrypted and decrypted data lengths should be same,
bcoz after encrypted that data should fit into that particular field of the same table.
I did not found any method for this case in the above class.
Thanks,
Radhika
‎2011 May 02 1:00 PM
even tho thats possible, be aware that Encryptions where Encrypted String is of same length as unencrypted are not at slightest safe encryptions.
‎2011 May 02 1:13 PM
Hai ,
Use this Sample code.
DATA pwd TYPE string.
DATA encoded TYPE string.
pwd = ls_node1-pwd.
CONDENSE pwd.
CALL METHOD cl_http_utility=>if_http_utility~encode_base64
EXPORTING
unencoded = pwd
RECEIVING
encoded = encoded.
‎2011 May 02 3:13 PM
I hope you're not using that method for actual password encryption. Base64 encoding should only be used for data transmission. I think the poster has used the incorrect term, BUT Florian is absolutely right about the hard-wired encryptor method. A child could hack that.
@poster: if you need to encrypt data, then configure and use the SAP Security library. The help files will tell you how to do this.