CodeIgniter Forums

Full Version: [split] CodeIgniter 3.0.6 Crypto doesn't work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

if you use the crypto SHA1 attention to the confirmation line, place the code | sha1 before the function matches [xxx] if the code does not work ???

codeIgniter 3.0.6 application BforBYOOS

` //if this is a new account require a password, or if they have entered either a password or a password confirmation
if ($this->input->post('password') != '' || $this->input->post('confirm') != '' || !$id)

       $this->form_validation->set_rules('password', 'lang:password', 'required|min_length[6]|sha1');

       $this->form_validation->set_rules('confirm', 'lang:confirm_password', 'required|sha1|matches[password]');

P.S updated codeigniter 3.0.6 modification is correct. the 26 march 2016

Gabriel BYOOS
What are you talking about?
@Narf, sorry for my English trad, Im French and to English I force...

traduction en Anglais google trad


I said that in the confirmation of Form_validation set_rules password if you place the end of the crypto then SHA1 parameters is not addressed in the [] matches function as crypto sha1 (see above code), in old CI version of the presence of crypto sha1 was not necessary in the confirmation (done the test!)

I just realized the C.I update to version 3.0.6 on BforByoos application, It's OK

better to you

Gabriel BYOOS
SHA1 is NOT encryption! Stop calling it that please.
sorry, to see this site

good night
If you're using SHA1 to encrypt your password, you're doing it wrong. In fact, if you're using anything to encrypt a password, you're doing it wrong. Passwords should be hashed with a secure hashing algorithm.