Skip to content

kjdev/php-password-hashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Password Hashing Command

PHP Password Hashing by C.

Build

% mkdir build && cd build
% cmake -DCMAKE_BUILD_TYPE=Release ..
% make
% make install

Test

Required: cutter

% make && make test

or

% make && cutter .

Coverage

% cmake -DCMAKE_BUILD_TYPE=Coverage ..
% make && make test
% lcov -c -d ./tests/CMakeFiles/test_php_password_hashing.dir/__/src/ -o test.cov
% genhtml --no-branch-coverage -f -o ./coverage ./test.cov

Command

php_password_hash — Creates a password hash

php_password_hash -p <PASSWORD> [-a <ALGORITHM>] [-s <SALT>] [-c <COST>]

  • -p, --password=PASSWORD : users's password
  • -a, --algorithm=ALGORITHM : hashing algorithm (no used) [DEFAULT: bcrypt]
  • -s, --salt=SALT : salt to use when hashing the password
  • -c, --cost=COST : cost that should be used [DEFAULT: 10]

php_password_verify — Verifies that a password matches a hash

php_password_verify -p <PASSWORD> -h <HASH>

  • -p, --password=PASSWORD : users's password.
  • -h, --hash=HASH : password hashed.

php_password_get_info — Returns information about the given hash

php_password_get_info -h <HASH>

  • -h, --hash=HASH : password hashed

About

PHP Password Hashing Command

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages