angrybytes / hash
Object Oriented hash interface
Installs: 26 220
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 7
Forks: 4
Open Issues: 0
Requires
- php: 8.1.* || 8.2.* || 8.3.*
Requires (Dev)
- phpstan/phpstan: 1.10.46
- phpunit/phpunit: 10.4.2
- squizlabs/php_codesniffer: 3.7.2
README
A simple PHP library that simplifies cryptographical hashing. It provides an object-oriented interface to a variety of hashing methods.
Requirements
- PHP
8.1
,8.2
or PHP8.3
(recommended)
Installation
Installation is done via Composer: composer require angrybytes/hash
.
Components
Hash
AngryBytes\Hash\Hash
is the main hasher class and acts as a helper wrapper
around hashers (i.e. AngryBytes\Hash\HasherInterface
implementations).
Some of the main features of this component:
- Hash strings and/or passwords.
- Create short hashes (e.g. used for identification).
- Compare strings/hashes using a time-safe method.
- Verify a string against a hash using the configured hasher.
Hashers
This library comes with a set of hashers to be utilized by this hash component (or to be used on their own):
AngryBytes\Hash\Hasher\BlowFish
AngryBytes\Hash\Hasher\MD5
AngryBytes\Hash\Hasher\Password
HMAC
AngryBytes\Hash\HMAC
can be used to generate
HMAC's
for string messages.
Contributing
Before contributing to this project, please read the contributing notes.
License
Please refer to the license file.