‎2008 Dec 30 4:04 AM
hi friends,
i want to store the database table for password by ' ******* '.
it's possible or not.
thanks in advance,
Regards,
ARUN.
‎2008 Dec 30 4:18 AM
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
‎2008 Dec 30 4:18 AM
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
‎2008 Dec 30 4:23 AM
hi ramesh,
give the sample code for encryption and decryption......
thanks for u r answer,
Regards,
ARUN.
‎2008 Dec 30 4:52 AM
<obsolete_urban_legend_removed_by_moderator>
Edited by: Julius Bussche on Feb 10, 2009 1:00 PM
‎2008 Dec 30 6:51 AM
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.
‎2009 Feb 06 6:17 AM
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
‎2009 Feb 10 10:47 AM
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
‎2009 Feb 10 1:10 PM
Hi ,
You can try this FM --- IDWT_CIS_PASSWORD_HASH .
Regards
Pinaki