3cfe65d2d4
- Cleanup - Spanish, French, Dutch, Chinese loc update
19 lines
413 B
C#
19 lines
413 B
C#
namespace ChatTwo.Util;
|
|
|
|
public static class WebinterfaceUtil
|
|
{
|
|
private static readonly Random Rng = new();
|
|
|
|
public static string GenerateSimpleAuthCode()
|
|
{
|
|
return (100000 + Rng.Next() % 100000).ToString()[1..];
|
|
}
|
|
|
|
public static string GenerateSimpleToken()
|
|
{
|
|
var buffer = new byte[15];
|
|
Rng.NextBytes(buffer);
|
|
|
|
return Convert.ToHexString(buffer);
|
|
}
|
|
} |