title: Difference between Controller and Model in MVC
body: <p>I'm little confused about controller and model in MVC framework (codeIgniter). Its clear to me that controller methods calls the views and Model methods interact with database.
  However, I'm little confused about the following types of methods, which are called by methods in a controller.</p>
  
  <pre><code>hash_password              //returns hash password. 
  valid_email               //validates email format and return true or false
  is_logged                //check if session has a variable, returns true or false
  generate_random_string  //generates and hashes a random string
  </code></pre>
  
  <p>Should they be placed in controller or in a model?</p>
  
  <p>Currently I place all of the above functions in a controller. Is it correct?</p>