Session validation key support added into installer

This commit is contained in:
feodor_fitsner 2012-09-13 18:20:44 -07:00
parent 0e9f10d63d
commit 72f545fd6b
8 changed files with 162 additions and 6 deletions

View file

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace WebsitePanel.Setup.Common
{
public class StringUtils
{
public static string GenerateRandomString(int length)
{
RNGCryptoServiceProvider crypto = new RNGCryptoServiceProvider();
byte[] data = new byte[length];
crypto.GetNonZeroBytes(data);
return BitConverter.ToString(data).Replace("-", "").ToLowerInvariant();
}
}
}