https://github.com/kjdev/php-password-hashing
PHP Password Hashing Command
https://github.com/kjdev/php-password-hashing
Last synced: 5 months ago
JSON representation
PHP Password Hashing Command
- Host: GitHub
- URL: https://github.com/kjdev/php-password-hashing
- Owner: kjdev
- License: mit
- Created: 2013-09-26T06:29:07.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-27T01:18:20.000Z (over 12 years ago)
- Last Synced: 2025-08-16T10:39:49.227Z (6 months ago)
- Language: C
- Size: 125 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](http://cutter.sourceforge.net/index.html)
```
% 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 \ \[-a \\] \[-s \\] \[-c \\]
* -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 \ -h \
* -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 \
* -h, --hash=HASH : password hashed