Password hashing

Storing passwords as a one-way scrambled hash, so even a stolen database doesn't reveal them.

Also called: bcrypt, Argon2, password_hash, hash

Type
Term
Source
General
Language
PHP

In plain English

Never store plain passwords and never use md5 or sha1 for them. PHP's password_hash uses bcrypt or Argon2.

Example

Passwords are stored with password_hash, so even we cannot read them.

In code

$hash = password_hash($password, PASSWORD_DEFAULT);
password_verify($input, $hash);     // true / false
// Laravel:
Hash::make($password); Hash::check($input, $hash);

Learn more

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30