SHA1 Password encryption

SDK Docs: http://installatron.com/developer/apps
SDK GUI Editor: http://installatron.com/editor
ZeeBOB
Posts: 3
Joined: Fri Oct 28, 2011 4:58 am

SHA1 Password encryption

Postby ZeeBOB » Fri Oct 28, 2011 5:03 am

Hi,

The application I am trying to package comes with its own installer. I am trying to remove this and do everything within the Installatron installer. I have pretty much every nailed down except for one part.

The normal script installer asks the user to provide an admin username, password etc however it stores the password as an sha1 value. The exact function is:

Code: Select all

sha1(sha1(SALT . $password))


So really this is the hash of the hash created from the SALTPASSWORD combination

Can I achieve this in the install file for Installatron?

Phil
Staff
Posts: 486
Joined: Tue Jun 19, 2007 6:06 am

Re: SHA1 Password encryption

Postby Phil » Fri Oct 28, 2011 7:17 am

Hello,

Sure, Installatron installer files are regular PHP files. You can simply do this:

$encodedPassword = sha1(sha1($salt.$this->input["field_passwd"]))

If there are any questions let us know.

Thanks,
Phil.
Phillip Stier
Installatron Co-Founder

ZeeBOB
Posts: 3
Joined: Fri Oct 28, 2011 4:58 am

Re: SHA1 Password encryption

Postby ZeeBOB » Sun Oct 30, 2011 2:00 am

Excellent! Thanks


Return to “Application Packaging SDK and Application Customizations”

Who is online

Users browsing this forum: No registered users and 1 guest