-
Notifications
You must be signed in to change notification settings - Fork 8
/
SecretKeys.cs.bak
32 lines (27 loc) · 961 Bytes
/
SecretKeys.cs.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Security.Cryptography;
using System.Text;
namespace Spark
{
internal static class SecretKeys
{
public const string discordRPCClientID = "774457093507514369";
public const string webLogPassword = "";
public const string CLIENT_ID = "706375130531758081";
public const string CLIENT_SECRET = "";
public const string OAuthURL = "https://discord.com/api/oauth2/authorize?client_id=706375130531758081&redirect_uri=http%3A%2F%2Flocalhost%3A6722%2Foauth_login&response_type=code&scope=identify";
private const string salt = "not_real";
public static string Hash(string input)
{
using SHA256 sha = SHA256.Create();
byte[] rawHash = sha.ComputeHash(Encoding.ASCII.GetBytes(input + salt));
// Convert the byte array to hexadecimal string
StringBuilder sb = new StringBuilder();
foreach (byte t in rawHash)
{
sb.Append(t.ToString("X2"));
}
string hash = sb.ToString().ToLower();
return hash;
}
}
}