4.0.0 (released 2019-04-03):
- Added UTF-8 support (thanks @bonfante)
- Removed PHP 7.1 support
3.0.0 (released 2018-03-12):
- Added BC and GMP math classes (thanks @jwpage)
- Update and optimize alphabet shuffling (thanks @jwpage)
- Removed PHP 5.0 support (#107)
2.0.4 (released 2017-10-28):
- Remove ext-bcmath requirement (#91)
2.0.3 (released 2017-01-01):
- Implemented unhash using Horner's method (thanks @jkramarz)
2.0.2 (released 2016-12-29):
- Fix bug related to bc math accuracy (thanks @jkramarz)
2.0.1 (released 2016-12-29):
- Fix bug related to big numbers (thanks @jkramarz)
2.0.0 (released 2016-11-15):
- Added .editorconfig file
- Added Codecov coverage
- Added StyleCI integration
- Dropped HHVM support
- Dropped PHP 5.3 - 5.5 support
- Updated file structure
- Updated how separators are generated
- Updated test suite
1.0.6:
CHANGELOG
moved to its own file (thanks @vinkla).gitattributes
added (thanks @vinkla)- autoload with PSR-4 (thanks @vinkla and @GrahamCampbell)
LICENSE
moved to its own file (thanks @vinkla).gitignore
file simplified (thanks @vinkla)- random
README
cleanups (thanks @vinkla) - applied PSR-1 and PSR-2 to the code (thanks @pablofmorales)
- typo in custom parameters example (thanks @McMillanThomas)
- testing against PHP 7.0 now (thanks @vinkla)
1.0.5:
- bug fix for passing empty array to
encode
(thanks @bpahan)
1.0.3 & 1.0.4:
- adjusting examples (thanks @Trismegiste)
- proper version bump in
const VERSION
1.0.2
- PSR-2 cleanup + interface changes (thanks @Trismegiste)
encode()
can accept array of integers (thanks @leunggamciu)
1.0.1
- bug fix for
encode_hex()
(thanks @leihog) - unit test for
encode_hex()/decode_hex()
1.0.0
-
Several public functions are renamed to be more appropriate:
- Function
encrypt()
changed toencode()
- Function
decrypt()
changed todecode()
- Function
encrypt_hex()
changed toencode_hex()
- Function
decrypt_hex()
changed todecode_hex()
Hashids was designed to encode integers, primary ids at most. We've had several requests to encrypt sensitive data with Hashids and this is the wrong algorithm for that. So to encourage more appropriate use,
encrypt/decrypt
is being "downgraded" toencode/decode
. - Function
-
Version tag added:
1.0
-
README.md
updated
0.3.1
- Added encrypt_hex() and decrypt_hex() support
- Minor: Relaxed integer check in encrypt() function (can now pass strings of numbers)
0.3.0 - Warning: Hashes change in this version:
- Bug fix: better handling of big numbers: vinkla#3 (thanks @tobsn and @miquelfire)
- Bug fix: exception throwing in constructor
- Default maximum number is set to 1 billion: 1,000,000,000. Unless you have GNU Multiple Precision or BCMath Arbitrary Precision Mathematics library installed - then
PHP_INT_MAX
is used. - Cleanup: private variables use underscores
0.2.1
- General directory cleanup + improvements
- Now only one library file for both PHP 5.3 and PHP 5.4
- Constants uppercased
- Namespace
Hashids
added to library class
0.2.0 - Warning: Hashes change in this version:
- Overall approximately 4x faster
- Consistent shuffle function uses slightly modified version of Fisher–Yates algorithm
- Generate large hash strings faster (more than 1000 chars)
- When using minimum hash length parameter, hash character disorder has been improved
- Basic English curse words will now be avoided even with custom alphabet
- Class name changed from
hashids
toHashids
- New unit tests with PHPUnit (requires latest PHP)
- Composer package at packagist: https://packagist.org/packages/hashids/hashids
- Minor: a bit smaller code overall -- more motivation to port to other languages :P
0.1.3 - Warning: Hashes change in this version:
- Updated default alphabet (thanks to @speps)
- Constructor removes duplicate characters for default alphabet as well (thanks to @speps)
0.1.2 - Warning: Hashes change in this version:
- Minimum hash length can now be specified
- Added more randomness to hashes
- Added unit tests
- Added example files
- Changed warnings that can be thrown
- Renamed
encode/decode
toencrypt/decrypt
- Consistent shuffle does not depend on md5 anymore
- Speed improvements
0.1.1
- Speed improvements
- Bug fixes
0.1.0
- First commit