Package src.util

Class password

java.lang.Object
src.util.password

public class password extends Object
Password Class to Hash Password and check also check them
  • Constructor Details

    • password

      public password()
  • Method Details

    • getHash

      public static String getHash(String password)
      Hash a Password with the SHA-256 Hash function
      Parameters:
      password -
      Returns:
      password as sha256-hash
    • check

      public static boolean check(String password, String hash)
      Check if the passworts are the same
      Parameters:
      password - that the user provided
      hash - from the database
      Returns:
      true if the password is correct, otherwise false