Application Development 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: 

FM for DECRYPT

Former Member
0 Kudos

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

former_member214131
Active Contributor
0 Kudos

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

0 Kudos

Hi Murugesh,

It is still giving blank

0 Kudos

Can you please take

data : enpwd like enpwd .

Regards,

Subhasish

0 Kudos

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

0 Kudos

The FM FIEB_PASSWORD_DECRYPT not writting the export parameter value

former_member188685
Active Contributor
0 Kudos

Hi,

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

Check any Notes on that FM.

Regards

vijay

Former Member
0 Kudos

In my system it isn't wprking correctly too

(4.7)

Former Member
0 Kudos

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.