This commit is contained in:
@@ -7,6 +7,7 @@ using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
|
||||
namespace AyaNova.PlugIn.V8
|
||||
@@ -189,6 +190,17 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
#region Misc utils
|
||||
|
||||
//used to set nonsense values from imported user login and password
|
||||
//just in case they are set active after import but never have their passwords set
|
||||
//so they can't be as easily hacked into
|
||||
public static string RandomString()
|
||||
{
|
||||
var b = new byte[32];
|
||||
var random = RandomNumberGenerator.Create();
|
||||
random.GetNonZeroBytes(b);
|
||||
return Convert.ToBase64String(b);
|
||||
}
|
||||
|
||||
public static string NormalizeTag(string inObj)
|
||||
{
|
||||
//Must be lowercase per rules
|
||||
|
||||
Reference in New Issue
Block a user