Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM for DECRYPT

Former Member
0 Likes
1,284

Hi Group,

When I am using the following code for decrypt the password which is encrypted the decrypt FM not working

properly,when I am writting the decrypted password it

is giving the blank,can any body suggest how to proceed.

Data enpwd(32) type c.

parameter pwd like enpwd .

                • Encrypting *******************

CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'

EXPORTING

IM_DECRYPTED_PASSWORD = pwd

IMPORTING

EX_ENCRYPTED_PASSWORD = enpwd

.

                • Decrypting *******************

CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'

EXPORTING

IM_ENCRYPTED_PASSWORD = enpwd

IMPORTING

EX_DECRYPTED_PASSWORD = pwd.

write 😕 pwd.

8 REPLIES 8
Read only

Former Member
0 Likes
1,115

please check the following:

Data enpwd(32) type c.
parameter pwd like enpwd .
<b>enpwd = pwd.</b>
******** Encrypting *******************
CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'
EXPORTING
IM_DECRYPTED_PASSWORD = <b>en</b>pwd
IMPORTING
EX_ENCRYPTED_PASSWORD = enpwd
.
clear pwd.
******** Decrypting *******************
CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'
EXPORTING
IM_ENCRYPTED_PASSWORD = enpwd
IMPORTING
EX_DECRYPTED_PASSWORD = pwd.
write :/ pwd.

regards, Murugesh AS

Message was edited by: Murugesh Arcot

Read only

0 Likes
1,115

Hi Murugesh,

It is still giving blank

Read only

0 Likes
1,115

Can you please take

data : enpwd like enpwd .

Regards,

Subhasish

Read only

0 Likes
1,115

Hi,

Please check the <b>BOLD</b> line of code and implement the same...

I have checked on my system (46C)and this works.

Best Regards, Murugesh AS

Message was edited by: Murugesh Arcot

Read only

0 Likes
1,115

The FM FIEB_PASSWORD_DECRYPT not writting the export parameter value

Read only

Former Member
0 Likes
1,115

Hi,

I think some problem with DECRYPT , it is not working.

Check any Notes on that FM.

Regards

vijay

Read only

Former Member
0 Likes
1,115

In my system it isn't wprking correctly too

(4.7)

Read only

Former Member
0 Likes
1,115

Hi,

Try this code. I am doing with Class

<b>CL_HTTP_UTILITY</b>.

For Encrypting using the Method.

<b>IF_HTTP_UTILITY~DECODE_BASE64</b>

For Decrypting using the Method.

<b>IF_HTTP_UTILITY~ENCODE_BASE64</b>


REPORT  zztest_pass                           .

PARAMETERS : pass(32) TYPE c.

DATA : passwd  TYPE string,
       encoded TYPE string,
       decoded TYPE string.

passwd = pass.
CONDENSE passwd.
CALL METHOD cl_http_utility=>if_http_utility~encode_base64
  EXPORTING
    unencoded = passwd
  RECEIVING
    encoded   = encoded.


CALL METHOD cl_http_utility=>if_http_utility~decode_base64
  EXPORTING
    encoded = encoded
  RECEIVING
    decoded = decoded.


WRITE : / 'Password Entered   :' , pass,
        / 'Encrypted Password :' , encoded,
        / 'Decrypted Password :' , decoded.

Regards,

Arun Sambargi.