A simple PHP library that simplifies cryptographical hashing. It provides an object-oriented interface to a variety of hashing methods.
- PHP
8.2
,8.3
or PHP8.4
(recommended)
Installation is done via Composer: composer require angrybytes/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.
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
AngryBytes\Hash\HMAC
can be used to generate
HMAC's
for string messages.
Before contributing to this project, please read the contributing notes.
Please refer to the license file.