Login

Always call the SealCheck function before invoking any authentication methods!

C# WINFORMS
/* 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();
   }
}

}
C# CONSOLE
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);
}
}
VB FORM
Private Sub Button1_Click()
    SealCheck.HashChecks()

    If SealCheck.isValidDLL Then
        Dim response As Boolean = TrinitySeal.Seal.Login(textBox1.Text, textBox2.Text)

        If response Then
            New Form2().Show()
            Me.Hide()
        End If
    End If
End Sub
VB CONSOLE
Private Shared Sub Main()
    Console.Title = "TrinitySeal"
    Console.Write("Enter your username: ")
    Dim username As String = Console.ReadLine()
    Console.Write("Enter your password: ")
    Dim password As String = Console.ReadLine()
    Console.ForegroundColor = ConsoleColor.Green
    Console.WriteLine("Authenticating...")
    Console.ForegroundColor = ConsoleColor.White
    SealCheck.HashChecks()

    If SealCheck.isValidDLL Then
        Dim response As Boolean = TrinitySeal.Seal.Login(username, password, False)

        If response Then
            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()
        End If
    Else
        Environment.[Exit](0)
    End If
End Sub

Last updated