Hashing Password

I want to hash my password before I save it to my database by using sha256 ? how would I do that ?and how do I validate this password in login ?

Thank you in advance.

hi take a look at CPasswordHelper


you can use bcrypt too

My link

Thank you, I got it how to use sha256 :)