Session validation key support added into installer
This commit is contained in:
parent
0e9f10d63d
commit
72f545fd6b
8 changed files with 162 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue