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.26k stars 417 forks source link

Ability to encode fractions/decimal places #176

Closed ajgaunt closed 2 years ago

ajgaunt commented 2 years ago

I understand about not encoding negative numbers, but we have the need to encode numbers containing decimal points. Is this something that may be able to be implemented?

SmuSmu commented 2 years ago

How about

Convert to String Explode to Array with the Point as separator Pass to hashids

Just as an Idea

vinkla commented 2 years ago

I understand about not encoding negative numbers, but we have the need to encode numbers containing decimal points. Is this something that may be able to be implemented?

Nothing we're planning at the moment.