yii CPasswordHelper: hashPassword and verifyPassword

CPasswordHelper works like PHP’s functions password_hash() and password_verify(), they are wrappers around the crypt() function. When you generate a BCrypt hash, you will get a string of 60 characters, containing the salt. // Hash a new password for storing in the database. $hashToStoreInDb = password_hash($password, PASSWORD_BCRYPT); The variable $hashToStoreInDb will now contain a hash-value like … Read more

Hash and salt passwords in C#

Actually this is kind of strange, with the string conversions – which the membership provider does to put them into config files. Hashes and salts are binary blobs, you don’t need to convert them to strings unless you want to put them into text files. In my book, Beginning ASP.NET Security, (oh finally, an excuse … Read more