Answer the question
In order to leave comments, you need to log in
What encryption do you recommend for receiving a promo code?
Hello. Nothing without you. Unfortunately, I am not an expert in cryptography.
Please advise an encryption algorithm with the following characteristics:
- result (cipher code) - only printable characters -
cipher
code as short as possible
-code.
Answer the question
In order to leave comments, you need to log in
Linking the code and its capabilities - on your server in the database.
Why encrypt something?
You just need to randomize and write to the database.
When used, mark that the code has been used (to prevent reuse/reuse).
table: id(uint), PromoId(string), isUsed (bool), Capabilities (string/JSON)
PromoId generator for 8 characters in mysql: select conv(floor(999999999*(1+rand())), 20, 36)
Generation results:
7NWRJK0E
8KS3L9PM
7W97CVQG
7UXQICE0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question