Page 1 of 1

Password Encryption

Posted: Tue Sep 09, 2008 3:48 pm
by it@isa-arbor.com
I am planning to move from AbleCommerce 5.5 to 7.0.

We have our own set of web site usernames and passwords. These accounts, and customer status are copied over to the able commerce database and updated daily. Other information such as membership status, which drives some discounts, is also pushed out. I've written a program that uses AbleCommerce DLLs to encrypt the passwords then insert them into the ableCommerce database. This is done on a daily bases to reflect acocunts that are added, altered or deleted.

I usually just have a SQL job scheduled to run at the appropriate time and it calls an exe, which uses an AbleCommerce DLL to encrypt the password then insert it in the proper table. DataPort strikes me as a tool to help with migration, something that would be used once. Currently I am adding and updating accounts daily, but only if the account exists in my DB and not the Able Commerce DB.

I'm using
* CommerceBuilder5L (CommerceBuilder5L.dll)
* CommerceBuilder5.Base (CommerceBuilder5.dll)
* CommerceBuilder5.Util (CommerceBuilder5.dll)

I'm grabbing each record I need to add or update, then I call..
CommerceBuilder5.Util.cbCrypto.Encrypt128(By Val String) as String

I get the password from my database which is now properly encrypted for use by AbleCommerce then make a database call to update or insert the password in the AbleCommerce Database. My users now have one password which works on both web sites.

Have the AbleCommerce functions I referenced changed? Has the encryption changed? Will I need to rebuild my encryption program?

Many thanks,

Ernie Noa
IT Manager
ISA

Re: Password Encryption

Posted: Tue Sep 09, 2008 10:21 pm
by sohaib
You will need to adapt your code for AC7. A lot has changed from 5.5 to 7.0. AC7 is almost a complete rewrite.
Yes the encryption has changed as well. In AC5x password encryption used to be two-way; i.e; you could retrieve the original text with decryption. In AC7 password encryption is one-way. You can not retrieve original password from its encrypted data.

Re: Password Encryption

Posted: Wed Sep 10, 2008 7:33 am
by it@isa-arbor.com
That is just the kind of information I was looking for. I will only need to send encrypted passwords to AC7, so that will work quite well.

I am pretty sure I will be able to figure out where to insert the data. I also push over products, weights, prices, etc.. but the documentation for AC has always been good and the database has been easy to understand (because it's put together well).

If you, or someone can point me to the correct library and function that would be outstanding. Please post here or send me an e-mail if you happen to know what library and function I will need to use to encrypt a password.

Re: Password Encryption

Posted: Wed Sep 10, 2008 7:45 am
by heinscott
UserPasswordHelper.EncodePassword("OldPassword", "SHA1");

That should encrypt the password for you.

Scott

Re: Password Encryption

Posted: Wed Sep 10, 2008 7:51 am
by it@isa-arbor.com
Thank you very much. The help is sincerely appreciated.