title: Generate unique id from unique string input
body: <p>I have a table with a column of unique string values. The max length of the string value is 255 char. I want to generate a unique id with the string value as input. In other words I am looking for a compact representation for a string. The unique id generated can be alpha-numeric. A useful feature to have would be to be able to regenerate the string value from the unique id. </p>
  
  <p>Is there an efficient function to generate such an unique id. Some ways could be using checksum or hash functions. I want to know if there is a standard way to do this. </p>
  
  <p>I am using MySql database and java. </p>
  
  <p>Thanks!</p>
  
  <p>--edit: I am looking for a more compact representation rather than just using the string itself. </p>