MATLAB: Encoding user information into a numeric format

caesarcipherencodehashlicensing

Hi all,
is there such an algorithm out there that takes in a plain text message, and returns a (short) string of integers? This would also need to be a reversable process. I am not looking for a strong ciphering algorithm, but rather a method to encode user information into a simple licensing number. The idea behind is to have this license number included in a digitally signed license file, from which I could then extract the user information to be displayed on a splash screen.
As such, the encoded string of numbers should not be very long – like max 10-15 digits, regardless of the length of the plain text message
Thanks in advance,
Tero

Best Answer

Take the data and lz compress it. You can use a java gzip method. Now base 64 encode it. Result goes into your license file.
At runtime base 64 decode, unzip into memory, extract.