I have string which has 24 char length. This is the product id which we given to customer to install our software. I have requirement to get email address from this string. I need to Encode email address with this string and decode that. Is there any possible to do that?
I have tried to convert the Email address to byte array and add that with product id byte array. But it seems the product id length is too increased and the unlock key length is not in standard Format. Please help me to solve this.
Since e-mail addresses can have more than 24 characters, this is not possible. (Simply put, you cannot encode X bytes of information in Y < X bytes without loss).
I suggest a different approach.
In your office:
On the customer’s PC:
This allows you to keep your activation code short, since you only need to embed a hash of the e-mail adress. Of course, since hash functions are not reversible, you cannot recreate the e-mail address from the hash; thus, the necessity to enter the e-mail address during installation.