This commit is contained in:
@@ -240,24 +240,7 @@ namespace Sockeye.Biz
|
||||
|
||||
|
||||
|
||||
private static string GenFetchCode()
|
||||
{
|
||||
|
||||
//sufficient for this purpose
|
||||
//https://stackoverflow.com/a/1344258/8939
|
||||
|
||||
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
var stringChars = new char[10];
|
||||
var random = new Random();
|
||||
|
||||
for (int i = 0; i < stringChars.Length; i++)
|
||||
{
|
||||
stringChars[i] = chars[random.Next(chars.Length)];
|
||||
}
|
||||
|
||||
var finalString = new String(stringChars);
|
||||
return finalString;
|
||||
}
|
||||
|
||||
|
||||
private static Dictionary<string, DateTime> LicenseToPluginsArray(License l)
|
||||
@@ -309,7 +292,7 @@ namespace Sockeye.Biz
|
||||
|
||||
StringBuilder sbKey = new StringBuilder();
|
||||
StringWriter sw = new StringWriter(sbKey);
|
||||
l.FetchCode = GenFetchCode();
|
||||
l.FetchCode = StringUtil.GenFetchCode();
|
||||
using (Newtonsoft.Json.JsonWriter w = new Newtonsoft.Json.JsonTextWriter(sw))
|
||||
{
|
||||
w.Formatting = Newtonsoft.Json.Formatting.Indented;
|
||||
|
||||
Reference in New Issue
Block a user