vinkla / hashids

A small PHP library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.
https://hashids.org/php
MIT License
5.28k stars 418 forks source link

encode_hex nt working in PHP #159

Closed NamarsahaM closed 3 years ago

NamarsahaM commented 3 years ago

It returns blank when I use:

$hashids = new Hashids\Hashids();
$hashed_text = $hashids->encode_hex("63706b64");

echo $hashed_text;

But it gets hashed when I try:-

$hashids = new Hashids\Hashids();
$hashed_text = $hashids->encode_hex("63706b");

echo $hashed_text;
vinkla commented 3 years ago

Thanks for reporting! Please provide a failing test case in a pull request.

NamarsahaM commented 3 years ago

I have raised same on stackoverflow:- https://stackoverflow.com/questions/65966294/hashid-encryption-returning-no-value-in-php