Class LoginCryptoLegacy

java.lang.Object
client.LoginCryptoLegacy

public class LoginCryptoLegacy extends Object
Provides cryptographic functions for password hashing. Legacy purpose as the method done here is insecure by hashing multiple times and overly complicated. Will go away when/if official oms has no more users with legacy passhashes.
  • Constructor Details

    • LoginCryptoLegacy

      public LoginCryptoLegacy()
  • Method Details

    • hashPassword

      public static final String hashPassword(String password)
      Hash the password for first time storage.
      Parameters:
      password - The password to be hashed.
      Returns:
      String of the hashed password.
    • checkPassword

      public static final boolean checkPassword(String password, String hash)
      Check a password against a hash.
      Parameters:
      password - The password to validate.
      hash - The hash to validate against.
      Returns:
      true if the password is correct, false otherwise.
    • isLegacyPassword

      public static final boolean isLegacyPassword(String hash)
    • encodeSHA1