Login
Always call the SealCheck function before invoking any authentication methods!
/* C# WINFORMS */
using TrinitySeal;
private void Button1_Click() { // Login button click event handler
SealCheck.HashChecks(); // Check integrity of auth files
if (SealCheck.isValidDLL) {
bool response = TrinitySeal.Seal.Login(textBox1.Text, textBox2.Text); // Edit message value on program settings to change the successful message box value!
if (response){
new Form2().Show();
this.Hide();
}
}
}using TrinitySeal;
static void Main() {
Console.Title = "TrinitySeal";
Console.Write("Enter your username: ");
string username = Console.ReadLine();
Console.Write("Enter your password: ");
string password = Console.ReadLine();
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Authenticating...");
Console.ForegroundColor = ConsoleColor.White;
SealCheck.HashChecks();
if (SealCheck.isValidDLL) {
bool response = TrinitySeal.Seal.Login(username, password, false);
if (response) {
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Successfully logged in!");
Console.ForegroundColor = ConsoleColor.White;
Console.Read();
}
else{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Failed to login!");
Console.Read();
}
}
else {
Environment.Exit(0);
}
}Last updated
Was this helpful?