Make salt length and password length static values so can be easier to change.
This commit is contained in:
parent
b674c521ba
commit
5654cba0d9
@ -309,6 +309,8 @@ namespace EduNetworkBuilder
|
||||
public static int WirelessReconnectDistance = 70; //Try to find a closer AP if we are this far out.
|
||||
public static int UntaggedVLAN = -1; //If the packet is not tagged.
|
||||
public static int MaxPacketsBeforeOptimizing = 50;
|
||||
public static int DefaultPasswordLen = 6;
|
||||
public static int DefaultSaltLen = 50;
|
||||
|
||||
public static string AllowedPasswordCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!~@#$%^&*()_+{}[]/?<>,.";
|
||||
public static string AllowedUsernameCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._";
|
||||
|
@ -137,12 +137,21 @@ namespace EduNetworkBuilder
|
||||
|
||||
public static string GenSalt(Random RanGen)
|
||||
{
|
||||
return GenCharString(RanGen, 50);
|
||||
return GenSalt(RanGen, NB.DefaultSaltLen);
|
||||
}
|
||||
public static string GenSalt(Random RanGen, int length)
|
||||
{
|
||||
return GenCharString(RanGen, length);
|
||||
}
|
||||
|
||||
public static string GenUserPW(Random RanGen)
|
||||
{
|
||||
return GenCharString(RanGen, 6);
|
||||
return GenUserPW(RanGen, NB.DefaultPasswordLen);
|
||||
}
|
||||
|
||||
public static string GenUserPW(Random RanGen, int length)
|
||||
{
|
||||
return GenCharString(RanGen, length);
|
||||
}
|
||||
|
||||
public static TripleDES GenKey(string password, string salt)
|
||||
|
Loading…
Reference in New Issue
Block a user