Hi i want to generate a unique key.
I want it to be made up of letters and numbers.
I have been looking at RC2 using the following code:
--------------------------
---------
using System.Security.Cryptograp
hy;
static void Main(string[] args)
{
RC2 r = RC2.Create();
r.GenerateIV();
r.GenerateKey();
for (short i = 13; i < 200; i += 13)
{
byte[] data = BitConverter.GetBytes(i);
byte[] enc = r.CreateEncryptor().Transf
ormFinalBl
ock(data, 0, 2);
Console.WriteLine("{0}\t= {1}", 13, Convert.ToBase64String(enc
));
}
Console.ReadLine();
}
--------------------------
----------
---------
The problem is that this generates a key that contains non alphanumeric characters:
i.e
/MQpLW6J+3o=
--------------------------
--
so is there anything out there that will generate a unique alphanumeric key (Not a guid) about 10-12 characters. something that will be unique across time.
thanks very much.
Start Free Trial