Learning Blog

預定調和

PHP 5.5 的 Password Function

| Comments

PHP 5.5 新加了用來處理 Password 加密的功能,Password Hashing Functions 裡面有列出新增的四個 function。

password_get_info

傳入一個加密字串取得。

password_hash

針對一個字串加密。

password_needs_rehash

當加密字串遺失了一些資訊時可以透過這個重新加密字串。

password_verify

確認字串和加密後的 hash 是否相同。

相關資訊

PHP RFC: password_hash() function behavior

Comments