mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Added hex (H) to the RandomString function.
This commit is contained in:
@@ -592,6 +592,7 @@ namespace RuriLib
|
||||
var uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
var digits = "0123456789";
|
||||
var symbols = "\\!\"£$%&/()=?^'{}[]@#,;.:-_*+";
|
||||
var hex = digits + "abcdef";
|
||||
var allchars = lowercase + uppercase + digits + symbols;
|
||||
outputString = new string(localInputString
|
||||
.ToCharArray()
|
||||
@@ -599,6 +600,7 @@ namespace RuriLib
|
||||
.Select(c => c == 'U' ? uppercase[data.rand.Next(0, uppercase.Length)] : c)
|
||||
.Select(c => c == 'D' ? digits[data.rand.Next(0, digits.Length)] : c)
|
||||
.Select(c => c == 'S' ? symbols[data.rand.Next(0, symbols.Length)] : c)
|
||||
.Select(c => c == 'H' ? hex[data.rand.Next(0, hex.Length)] : c)
|
||||
.Select(c => c == 'A' ? allchars[data.rand.Next(0, allchars.Length)] : c)
|
||||
.ToArray());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user