Skip to main content
Topic: How? Generate Password from external script (Read 1690 times) previous topic - next topic

How? Generate Password from external script

Hi,

I am building an application which has another frontend. From that I want to create users for PHPRad.
I would like to give each user a different password to log into the phprad generated application.

So my question is: How does PHPRad generate the password which sits in the user table's password field?

Thanks already
Olaf

Re: How? Generate Password from external script

Reply #1
Phprad uses PHP bycrypt hashing algorithm with default settings. You can take a look at the IndexController.php file and see what it generate.

You can still use other password hashing mechanism like MD5 sha1,sha256 etc... Or no hashing at all.

Under the password file in Phprad application just select the password hashing you want.

Regards

Re: How? Generate Password from external script

Reply #2
Hi Emman,

thank you very much for this detailed answer. I will check your suggested solutions.
Olaf

Re: How? Generate Password from external script

Reply #3
Hi Emman,

when you use SHA-256 hasing - are you hashing the password only or are you adding some salt (email address)?
Where is the salt placed? PasswortSalt or SaltPassword - or different?

Olaf

Re: How? Generate Password from external script

Reply #4
Hi Emman,

forgot:
if there is no salting done when using SHA-256, is there a way where I can define some SALT to be added to the hashing (SHA-256)?
In config.php I could not find anything like it.

Olaf

 

Re: How? Generate Password from external script

Reply #5
You can use the  APP_ID or Define your own app secret in the config and use it as a salt for your password hashing.

Thanks