‎2010 Apr 02 9:53 AM
Hi Experts,
Im in the need of encrpt and decrpt some text. For that I used Function modules,
SSFC_BASE64_DECODE
SSFC_BASE64_ENCODE
First I decode the text using SSFC_BASE64_DECODE.
Input : ABCD123
Output : 001083D76D
I passed this output to SSFC_BASE64_ENCODE
Input : 001083D76D
But the output this FM is ABCD120=.
Why its not giving the proper output?
Can any one help me on this?
Thanks,
Helps will be highly appreciated.
‎2010 Apr 02 10:26 AM
Hi Nandini,
In FM SSFC_BASE64_DECODE
pass parameter b64leng = 0
In FM SSFC_BASE64_ENCODE
pass parameter binleng = 0
Hope this will solve your problem.
Regards
Ahsan
‎2010 Apr 02 10:26 AM
Hi Nandini,
In FM SSFC_BASE64_DECODE
pass parameter b64leng = 0
In FM SSFC_BASE64_ENCODE
pass parameter binleng = 0
Hope this will solve your problem.
Regards
Ahsan
‎2010 Apr 02 11:09 AM
Thanks for the reply ashan..
But still the same problem.
Thanks.
‎2010 Apr 02 11:34 AM
Hi Nandini,
If you pass other than 0 in BINLENG this is happening, Check once without passing the value here.
B64LENG BINLENG leave them Empty they will take the Default Values and chek now
Test run in SE37 I did it by checking them and i am not getting it correct.
Nandini,
Instead use FM DECODE_SLDPWD_BASE64 and ENCODE_SLDPWD_BASE64
Check the below threads for some interesting Descussions
Check this one Aswell
/people/kathirvel.balakrishnan2/blog/2006/11/21/encryption-decryption-of-data-using-abap
Hope i have provided you what you are looking for, else search for some more results which serve your purpose.
Cheerz
Ram
‎2011 Sep 21 11:47 PM
Hi Nandini,
Where did you get the first string (ABCD123) from? how do you know that string is a correct base64-encoded string?
You should encode something first and then decode it, not the other way around. If you encode first using SSFC_BASE64_ENCODE and then run FM SSFC_BASE64_DECODE with the output from the previous FM, it should return the original value.
Hope this helps.