We want to generate coupon code series and then encrypt those coupon code in numeric only and that must also be able to decrypt.
We will be sharing encrypted code as coupon code with customer.
These are the conditions:
- encrypted code must not be in series or not easily able to guess. It must be NUMERIC
- Encrypted code must be having specific number of digits.
Example :
We generate coupon code from 1 to 100 (needs in millions and plainCode will be either numeric or alphanumeric doesn't matter).
We want share encrypted numeric coupon code with specific digits to user. i.e. if code is 52 then encrypted code gives us between 10000 to 99999 (if 5 digits are specified or it need to be fix number of digits)
We are also able to decrypt the same.
HOW WE CAN DO THIS. ANY IDEA OR SUGGESTIONS?
Thank You.
NOTE:
- Above is just an example. possibilities are in millions.
- Security is not a major concern. just not able to guess is matters a lot.
- encrypted code must be in numeric.