Hot Dog
Hot Dog

Reputation: 35

How can I use a hashed password without password_verify in the array?

For a customer (doctor) I have created a contact form. In the mailer.php configuration the email password is entered in plain text in an array. Of course, a doctor is not allowed to give me his password, otherwise I would have access from his confidential mails.

$hash = '$2y$10$d8QH/GEteeeZIHf8ohw.1eKtr7p0G92OaQDo6fFNN3fMi73BsS0WC'; // password: 123

$config['smtp'] = array(
'host' => 'mailout.server.com',
'port' => 465,
'username' => 'the-username',
'password' => '123', // i wanna use $hash instead of plaintext password
'encryption' => 'ssl'
);   

How can I use a hashed password in the array? The password_verify function is unnecessary for this, as no password is entered into a form and needs to be verified. It's just a matter of not entering the password in plain text in the configuration. Unfortunately I have not found a solution for this.

Many thanks for your support!

Upvotes: 0

Views: 81

Answers (0)

Related Questions