Codeigniter: How can i encrypt password before submitting the form to the controller?

前端 未结 5 673
隐瞒了意图╮
隐瞒了意图╮ 2020-12-28 12:06

I have a simple html login form

5条回答
  •  感动是毒
    2020-12-28 12:18

    $password = sha1($this->input->post('password'));
    
    or 
    
    $hash= $this->input->post('password');
    
    $password= $this->encrypt->sha1($hash);
    

    you can use md5 instead of sha1 but sha1 is more secure then md5... and both md5 & sha1 are non-decodable

提交回复
热议问题