Generating passwords with CodeIgniter – the bare bones
Okay, this is just the bare bones process. If you want a full example, then the preceding recipe is for you. This recipe is for people who already have a create-user process, but wish to integrate some password protection into an existing process.
How to do it...
If you don't need the preceding recipe and only require the bare bones of hashing/comparing; please refer to the following steps:
Generating a hash
To generate a hash, perform the following steps:
- Generate a hash with a key in
// Call Encrypt library $this->load->library('encrypt'); $hash = $this->encrypt->sha1($text_to_be_hashed);
- Generate a hash with a key other than that in