10-24-2007 4:52 PM
Hi,
We are developing a tool, that needs userID and pssword to access it.
So we want to store the information in a custom table. The maximum length of the password is 10 characters.
I used the function module to scrammble the password, but when I put this hexa value in a raw field defined in the custom table, then it adds Zero's at the end based on the length of the password. When I want to use this for checking the access I am facing the problem due to the Zero's at the end.
For example:
Passowrd : test@123
Scramble String: A3ED2E10FF13695E
When I store this in table it will be A3ED2E10FF13695E0000
I used a domain with data type RAW 10 for the password field. SAP USR02 table uses RAW 08.
Q1: How can I eliminate zero's at the end while storing it? I didn't wan to manually remove the trialing zero's while checking the access. This might cause problems becuase if the string it self contains a last character as zero.
Q2. Is there is a way to get back the original string from the scramble string.
Appreicate your ideas on this.
Thanks
10-24-2007 5:01 PM
10-24-2007 5:38 PM
Ashish,
We are using the SAP 4.6C system and there is no class with the name cl_http_utility in it.
I am looking for the best way to store and retrieve the passwords.
Thanks
10-24-2007 6:04 PM
You shouldn't be able to decrypt back the password, because, then anyone could do it by calling the relevant method or function module.
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 (which also was encypted using the FM).
Regards
10-24-2007 6:17 PM
I need decryption as well, because I need to send this password to the SAP standard function module. That is the reason why I am using the scramble, SAP takes the scramble word for the passord in a function module.
10-24-2007 6:45 PM
Hi,
You can use the Function Modules 'FIEB_PASSWORD_ENCRYPT' and 'FIEB_PASSWORD_ENCRYPT' .
http://www.sap-img.com/abap/function-module-for-encryption-and-decryption.htm
Reward Points if useful.
Regards,
Abhishek
10-24-2007 6:45 PM
Hi,
You can use the Function Modules 'FIEB_PASSWORD_ENCRYPT' and
'FIEB_PASSWORD_DECRYPT' .
http://www.sap-img.com/abap/function-module-for-encryption-and-decryption.htm
Reward Points if useful.
Regards,
Abhishek
10-25-2007 3:30 PM
10-25-2007 3:45 PM
10-25-2007 3:59 PM
Sreejith,
I can't use the RAW 08, because for some of the websites we access has passwords upto 10 character length.
Thanks