2
앱에서 나는 암호를 편집하고 암호를 만들어야하고 내가 길을 찾았다 고 생각하지만 그 정확성을 의심합니다.Codeigniter Ion Auth 암호를 생성
나는 이온 인증을 통해 파고와 ion_auth_model
/**
* Hashes the password to be stored in the database.
*
* @return void
* @author Mathew
**/
public function hash_password($password, $salt=false, $use_sha1_override=FALSE)
{
if (empty($password))
{
return FALSE;
}
//bcrypt
if ($use_sha1_override === FALSE && $this->hash_method == 'bcrypt')
{
return $this->bcrypt->hash($password);
}
if ($this->store_salt && $salt)
{
return sha1($password . $salt);
}
else
{
$salt = $this->salt();
return $salt . substr(sha1($salt . $password), 0, -$this->salt_length);
}
}
에서이 기능을 발견하고 내 컨트롤러
public function Qpass_gen(){
$pass = $this->ion_auth_model->hash_password('password',FALSE,FALSE);
echo $pass;
}
를 중 하나에이 공용 기능을 만들어 테스트와 나는 함께 Qpass_gen()
문자열을 교체 할 때 ion_auth에 의해 데이터베이스에 기본적으로 저장되어있는 하나, 나는 그럭저럭 로그인 할 수 있었다.
나의 발전법은 빠르게 발전했다. 항상 작동하도록 보장 g 암호?.
이 질문에 대한 답변을 제공하지 않습니다. 비평하거나 저자의 설명을 요청하려면 게시물 아래에 의견을 남겨 둡니다. –
@ rink.attendant.6 질문은 _ "항상 작동하도록 보장 된 암호를 신속하게 생성하는 내 방법입니까?"_ 나는 이온 인증의 창조자로부터이 대답이 OP의 우려를 제거하기에 충분하다고 생각합니다. – semihcosu