I need to generate a string using Java based on another string. But I need also to be able to check that the string generated is valid using the original string. The thing is that I need a Java app that can generate a valid code for each customer to allow them to do some actions, so when they use it, I need to be able to validate that the code they imputed was valid for that customer.
The origin string could be the email which is an unique field or maybe the id... Also the same logic to generate the key needs to be done in an Android app so they can get the key in case they are offline and then in the Java app I need to be able to verify if that key was valid or not.