Hi, can i ask what is the difference of this two,and which one should i use in my registration form to encrypt password..

sha2('$password',256)
or

hash('sha256',$password

Thank you in advance.