‎2011 Dec 21 9:18 AM
Hi,
i am developing an integration between SAP and SFTP.
i want to save the encrypted password of SFTP to database tables and then i want to use the decrypted password to connect SFTP.
how to convert the encrypted password to decrypted?
can somebody help me please?
Best regards.
‎2011 Dec 21 9:52 AM
Hi
you will have to encrypt the entered password first and compare the encrypted passwords.
Im not sure, but maybe FM VRM_COMPUTE_MD5 will do the encrypting-job.
just check it out and also check below FM
Try the DB_CRYPTO_PASSWORD function module, there's no way to decrypt it back that I know of. You just pass the user input to the function module and compare the encrypted output to the value stored in the database.
and also try this two
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.
Warm Regards
NZAB
‎2011 Dec 21 10:05 AM
HI,
Use the following FM to encrypt
CALL FUNCTION 'FIEB_PASSWORD_ENCRYPT'
Use the following FM to decrypt
CALL FUNCTION 'FIEB_PASSWORD_DECRYPT'
‎2011 Dec 26 8:44 AM
Hi,
i found code below and solved;
**--Password
clear v_ac_string . v_ac_string = S_PASS .
TRY.
CALL METHOD o_encryptor->encrypt_string2string
EXPORTING
the_string = v_ac_string
RECEIVING
result = i_data-password.
CATCH cx_encrypt_error INTO o_cx_encrypt_error.
CALL METHOD o_cx_encrypt_error->if_message~get_text
RECEIVING
result = v_error_msg.
MESSAGE v_error_msg TYPE 'E'.
ENDTRY.
**--password
CLEAR v_dec_string . CLEAR v_ac_string .
v_ac_string = i_data-password .
TRY.
CALL METHOD o_encryptor->decrypt_string2string
EXPORTING
the_string = v_ac_string
RECEIVING
result = v_dec_string.
CATCH cx_encrypt_error INTO o_cx_encrypt_error.
CALL METHOD o_cx_encrypt_error->if_message~get_text
RECEIVING
result = v_error_msg.
MESSAGE v_error_msg TYPE 'E'.
ENDTRY.
password = v_dec_string.
‎2022 Apr 28 2:58 PM
Hi,
you can use this class for encryption and decryption passwords
class->CL_HARD_WIRED_ENCRYPTOR
regards
venkatesh