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

Encryption

Former Member
0 Likes
978

Hi All,

i got a requirement to encrypt and decrypt a particular field. How we can perform encrypt and decrypt in abap,

Please suggest me some classess or Function module to do the same.

Thanks and Regards,

Siva

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
880

Hi Siva,

Function Module for Encryption and Decryption

Any function module which can be used for encryption or decryption of any particular field?

Use the following FM to encrypt

CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'

Use the following FM to decrypt

CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'

By these FM you can encrypt & decrypt any fields of the Program.

Regards,

Dhina..

6 REPLIES 6
Read only

Former Member
0 Likes
881

Hi Siva,

Function Module for Encryption and Decryption

Any function module which can be used for encryption or decryption of any particular field?

Use the following FM to encrypt

CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'

Use the following FM to decrypt

CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'

By these FM you can encrypt & decrypt any fields of the Program.

Regards,

Dhina..

Read only

0 Likes
880

Hi,

I Already tried this FM:

We can encrypt by using this thats fine

but while doing the decrption of the encrypted value

The FM Returning blank value.

Read only

Former Member
0 Likes
880

Hi Siva,

Two more things:

1. You can't use these FM to decode user passwords.

2. Although their import parameters are case sensitive, when you test them from se37, the import parameters are converted to uppercase (thus, it may seem that they aren't working). A suggestion: encapsulate them in a custom FM that receives a string to be encrytped/decrypted and a parameter that says if you want to encrypt or decrypt and call this fm from your program. Test them very carefully, because once the string has been encrypted the decryption side is the only way to get it back.

function zsecurtext.

*"----


""Interfase local

*" IMPORTING

*" REFERENCE(INTEXT) TYPE FIEB_DECRYPTED_PASSWD OPTIONAL

*" REFERENCE(ENCRYPT) TYPE C OPTIONAL

*" EXPORTING

*" REFERENCE(OUTTEXT) TYPE FIEB_DECRYPTED_PASSWD

*"----


    • NOTE: This code doesn't work if run from se37. You should

    • encrypt

if encrypt = 'X'.

call function 'FIEB_PASSWORD_ENCRYPT'

exporting

im_decrypted_password = intext

importing

ex_encrypted_password = outtext.

else.

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

call function 'FIEB_PASSWORD_DECRYPT'

exporting

im_encrypted_password = intext

importing

ex_decrypted_password = outtext.

endif.

endfunction.

Regards,

Dhina..

Read only

Former Member
0 Likes
880

Use this Fm for 64 Bit encryption - DECODE_SLDPWD_BASE64.

And Check this link also,

/people/kathirvel.balakrishnan2/blog/2006/11/21/encryption-decryption-of-data-using-abap

Hope this will help you,

Thanks&Regards,

Manu S

Edited by: ManuSNair on May 10, 2011 10:54 AM

Edited by: ManuSNair on May 10, 2011 10:56 AM

Read only

Former Member
0 Likes
880

Hi Siva,

Please Ref the Link..

Regards,

Dhina..

Read only

Former Member
0 Likes
880

Solved