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

feat: enable hashid alphabet + hashMinLength to be configured #3

Closed oddnavy closed 5 years ago

oddnavy commented 5 years ago

We needed to adjust the hashid config when working on a project. This PR adds the ability to change the hashid alphabet and min hash length

rungta commented 5 years ago

Thank you for the pull request @oddnavy! It’ll be great if you can make the following minor edits:

oddnavy commented 5 years ago

No worries @rungta. I've pushed some changes.

Only pass a third argument to the Hashids() constructor if we have a non-null $this->alphabet value

How would recommend doing ☝️