Welcome Guest, Not a member yet? Register   Sign In
Trying to use sha1 and encyption key together on post
#1

[eluser]Unknown[/eluser]
Hi guys, I hope you can help me,

I am in the process of changing our membership structure over but the original code has the members passwords encrypted using the following.

function prep_password($password)
{
return sha1($password . $this->config->item('encryption_key'));
}

I would like to using the following, input boxes for members to update their password, and just struggling to get the encyption to match withy existing password,

public function add_user()
{
$data=array(
'username'=>$this->input->post('user_name'),
'email'=>$this->input->post('email_address'),
'password'=>sha1($this->input->post('password', TRUE))

//$password => $this->input->post('password '),
);
$this->db->insert('userTest',$data);

Any help would be much appreciated.

Cheers


Messages In This Thread
Trying to use sha1 and encyption key together on post - by El Forum - 07-11-2014, 08:20 AM
Trying to use sha1 and encyption key together on post - by El Forum - 07-11-2014, 12:58 PM
Trying to use sha1 and encyption key together on post - by El Forum - 07-11-2014, 02:22 PM
Trying to use sha1 and encyption key together on post - by El Forum - 07-11-2014, 06:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB