Is it possible from one string (date) generate another fixed length string (5-char code) by some encrypting algorithm for example? Also should be possible to confirm that a output string (5-char code) has been generated using the input string (date)
What I need:
- generateCode("10-10-2010") -> "HG45Q"
- isCodeValid("HG45Q", "10-10-2010") -> true