miranj / craft-cryptographer

A Craft CMS plugin that adds Twig filters to encrypt and decrypt content via URL-safe strings.
https://plugins.craftcms.com/cryptographer
MIT License
13 stars 2 forks source link

Issue with mask numbers for decimal places #6

Open ajgaunt opened 2 years ago

ajgaunt commented 2 years ago

It appears the mask numbers function only works for whole numbers, not numbers with decimal places. Can use the encrypt function but thought I'd just see if this was an item that could be updated.

rungta commented 2 years ago

That is correct @ajgaunt. The maskNumbers Twig filter is simply a wrapper around HashIds which says:

The library currently supports only positive numbers and zero.

You could try putting in a feature request with them, perhaps? I’ll update the documentation to mention this nuance on the plugin's page.