2006 Nov 22 4:21 AM
Hiii Everybody,
We are developing a tool. in that for the client to enter a transaction he must enter the password. if the password is correct he is allowed to go inside the transaction. so i want to know is there any method using which i can encrypt the password in SAP. i dont want to use the function modules because it contains the decryption also. the decryption method must be known only to us and not the client. can somebody help me out on this??
Hiii Everybody,
We are developing a tool. in that for the client to enter a transaction he must enter the password. if the password is correct he is allowed to go inside the transaction. so i want to know is there any method using which i can encrypt the password in SAP. i dont want to use the function modules because it contains the decryption also. the decryption method must be known only to us and not the client. can somebody help me out on this??
2006 Nov 22 4:25 AM
2006 Nov 22 4:53 AM
can u explain me how to use that function group in detail..hope u don mind:)
2006 Nov 22 5:03 AM
hi,
reference ..
http://www.sap-img.com/abap/function-module-for-encryption-and-decryption.htm
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.
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.rgds
Anver
2006 Nov 22 4:27 AM
2006 Nov 22 4:33 AM
Hi,
Did you try FM "FIEB_PASSWORD_ENCRYPT" ??
i think the client cannot use this to decrypt. So wheres the issue?
Cheers
VJ
2006 Nov 22 4:42 AM
Hiii vijay.
There's a FM FIEB PASSWORD DECRYPT..,,isnt it?? so if the client comes to know that i have used this FM for my encryption he can use the FM for decryption to decrypt it... can u please clarify on this??
2006 Nov 22 4:59 AM
Hi Venkat,
Guess then the best way is to write your own encryption logic or use third-party encryption tools to encryot the code.
a simple approach is to store the password in a custom table and do not gives access to read this table to client. This way you really dont need to encrypt the password.
Hope this makes sense.
Cheers
VJ
2006 Nov 22 5:11 AM