I need a C# method to encrypt an integer to a string of five characters where valid characters are a-z, A-Z, 0-9
I need to do this because I am sending URLs to users that look like this...
http://www.website.com.au/3
Users will see data at this URL that is specific to them. The data is not ultra sensitive, but it is seen as unacceptable to view someone else's broadcast simply by entering the next number:
http://www.website.com.au/4
However there is also a need to keep the URL's short and readable as the URLs could reach you via a text message and we don't want to loose text message space by a massively long encrypted value so
http://www.website.com.au/3
Might become
http://www.website.com.au/a6Yqo
I realise this level of encryption is quite weak but it is good enough for these broadcasts
public string Encrypt(int number)
{
}
public int Decrypt(string encrypted)
{
}
Where do I start?