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

password store

former_member224008
Active Participant
0 Likes
979

hi friends,

i want to store the database table for password by ' ******* '.

it's possible or not.

thanks in advance,

Regards,

ARUN.

1 ACCEPTED SOLUTION
Read only

learnsap
Active Participant
0 Likes
880

Hi Arun,

We cannot store the password in the database as '******'. But we can encrypt the password using function modules and store it in the database to know the password we need to decrypt using the other function module.

Regards,

Ramesh

7 REPLIES 7
Read only

learnsap
Active Participant
0 Likes
881

Hi Arun,

We cannot store the password in the database as '******'. But we can encrypt the password using function modules and store it in the database to know the password we need to decrypt using the other function module.

Regards,

Ramesh

Read only

0 Likes
880

hi ramesh,

give the sample code for encryption and decryption......

thanks for u r answer,

Regards,

ARUN.

Read only

learnsap
Active Participant
0 Likes
880

<obsolete_urban_legend_removed_by_moderator>

Edited by: Julius Bussche on Feb 10, 2009 1:00 PM

Read only

0 Likes
880

hi ramesh,

sorry,u r code is not working .

the same result an all encryption.

decryption does not works

thanks for u r answer,

Regards,

ARUN.

Read only

Former Member
0 Likes
880

Hi Arun,

The two function modules are only used for encryp and decrypt the password.

so that encrypted password is stored in tavble and while receiving get the decrypt pswd,

use the two function modules correctly,

Thanks

Rajendra

Read only

Former Member
0 Likes
880

Hi,

Use the following data element for the password field DBCON_PWD

and the following fn mod DB_CRYPTO_PASSWORD.

sample code:

data : G_ENCODED_PASSWORD TYPE DBCON_PWD

CALL FUNCTION 'DB_CRYPTO_PASSWORD'

EXPORTING

CLEAR_TEXT_PASSWORD = G_NEWPWD " input by user IMPORTING

ENCODED_PASSWORD = G_ENCODED_PASSWORD " encrypted password EXCEPTIONS

CRYPT_OUTPUT_BUFFER_TO_SMALL = 1

CRYPT_INTERNAL_ERROR = 2

CRYPT_TRUNCATION_ERROR = 3

CRYPT_CONVERSION_ERROR = 4

INTERNAL_ERROR = 5

OTHERS = 6.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ELSE.

xxxxx_USRLOGIN-PASSCODE = G_ENCODED_PASSWORD. " reading from table and comparing with encrypted password.

.

IF SY-SUBRC EQ 0.

MESSAGE 'Password Changed Successfully.' TYPE 'S'.

ENDIF.

hope it helps you

thanks & regards

GP

Edited by: GP on Feb 10, 2009 4:17 PM

Read only

Former Member
0 Likes
880

Hi ,

You can try this FM --- IDWT_CIS_PASSWORD_HASH .

Regards

Pinaki