public static String GenerateKey(Int32 count)
{
String retVal = "";
if (count > 0)
{
try
{
byte[] randomNumber = new byte[count];
RNGCryptoServiceProvider Gen = new RNGCryptoServiceProvider();
Gen.GetBytes(randomNumber);
for (int x = 0; x < count; x++)
{
if (x > 0)
{
retVal += ",";
}
retVal += Convert.ToInt32(randomNumber[x]).ToString();
}
}
catch (Exception err)
{
throw new Exception("Halide.H3Secure Error: " + err.ToString());
}
}
return retVal;
}