⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

md5 Encrypt/Decrypt not working



zhumarlin

zhumarlin
  • profile picture
  • Member

Posted 01 June 2012 - 14:56 PM

I have read this in many times : /topic/113-example-password-field-and-password-encryptiondecryption/ [b][EXAMPLE] Password field and password encryption/decryption[/b]

But when i post a new record, the password isn't encrypted with md5, and i don't know what kind method of that (sha1, or ??)

on my config.php file i write this :

[i]$config['encryption_key'] = "md5";[/i]

i think that's right.

so what is the problem..?

one more, could you explain this part..?
function encrypt_password_callback($post_array, $primary_key = null)
{
$this->load->library('encrypt');
[b]$key = 'super-secret-key';[/b]
$post_array['password'] = $this->encrypt->encode($post_array['password'], $key);
return $post_array;
}

what is 'super-secret-key' ? what if i change it with md5..?

thank you and sorry for my bad english...

cangak

cangak
  • profile picture
  • Member

Posted 30 June 2012 - 00:47 AM

all you have to do is read this.[list]
[*]understanding CI by reading the user_guide
[*]read this one
[/list]