mderazon/order-id

Secret key

douglasrcjames opened this issue · 2 comments

Hi, love this library, but wanted some more context on the secret. What exactly is this secret key used for? Is this just a string that is used to help hash out a unique order number? What characters are allowed in this string? All characters?

Is this just a string that is used to help hash out a unique order number

Yes, only that the "hashing" is reversible - If you call getTime() on the generated order id, it will give you back the date that was used to generate that order id. Just an extra feature, maybe you don't need it at all.

What characters are allowed in this string? All characters?

Yes, any string.

Hope it's more clear.

Useful feature, thanks for clarifying!