07-16-2008 1:17 PM
Hi
Please tell the function module names to Encrypt the code with key and Decrypt code with key.
i know these function module names
'FIEB_PASSWORD_ENCRYPT' and 'FIEB_PASSWORD_DECRYPT'
but its not working.
Is there any other function modules?
if it is not there please tell the documentation of the to create encrypt function module and decrypt function module.
Thanks.
Edited by: Craig Cmehil on Jul 18, 2008 10:01 AM
07-16-2008 1:32 PM
Hi,
Use this function module
g_key TYPE i VALUE 26101957,
g_slen TYPE i,
g_slen = STRLEN( g_pwd ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = g_pwd
sourcelen = g_slen
key = g_key
IMPORTING
destination = g_pwd.
07-16-2008 2:21 PM
Hi Mukesh,
Very thanks to your answer.
But here if i used to this logic for encryption, How to write the decript logic.
Please tell me.
Thanks.
07-16-2008 2:59 PM
07-17-2008 7:24 PM
try this it will do little bit closer to encription and decription
DATA:
g_key TYPE i VALUE 26101957,
g_slen TYPE i,
g_pwd type string VALUE 'Pass1234',
g_pwd1 type xstring ,
obj type ref to cl_http_utility.
CREATE OBJECT obj.
CALL METHOD obj->if_http_utility~encode_utf8
EXPORTING
unencoded = g_pwd
receiving
encoded = g_pwd1
EXCEPTIONS
conversion_failed = 1
others = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD obj->if_http_utility~decode_utf8
EXPORTING
encoded = g_pwd1
receiving
unencoded = g_pwd
EXCEPTIONS
conversion_failed = 1
others = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ g_pwd.
07-18-2008 7:59 AM
Hi Mukesh,
Thanks for your answer.
Please can you explain clearly.
Here what is import and export parameters?
Thanks
07-18-2008 11:04 AM
07-18-2008 2:50 PM
Hi Matthew,
Thanks for your answer.
I tried all function modules, but i didn't get proper one. that is the reason i posted a query this time is there any other possibility to create a encrypt and decrypt function function module.
Any one please tell me.
Thanks.
07-18-2008 3:04 PM
Fair enough.
There are a number of places on the web that have algorithms for en/decryption. It's not a trivial thing to write your own, but it would be possible.
matt