Ejemplo n.º 1
0
 public Klant(
     String voornaam,
     String familienaam,
     Adres adres,
     String gebruikersnaam,
     String paswoord,
     String email) {
   stringCtl(voornaam);
   this.voornaam = voornaam;
   stringCtl(familienaam);
   this.familienaam = familienaam;
   this.adres = adres;
   stringCtl(gebruikersnaam);
   this.gebruikersnaam = gebruikersnaam;
   stringCtl(paswoord);
   this.paswoord = PasswordHash.createHash(paswoord);
   emailCtl(email);
   this.email = email;
   this.admin = false;
 }
Ejemplo n.º 2
0
 public void setPaswoord(String paswoord) {
   this.paswoord = PasswordHash.createHash(paswoord);
 }
Ejemplo n.º 3
0
 /**
  * Verifies if a plain text password matches the stored hash
  *
  * @param paswoord Plain text password string
  * @return Returns true if they match, false if the don't
  * @throws NoSuchAlgorithmException If something goes wrong during the hashing
  * @throws InvalidKeySpecException If something goes wrong during the hashing
  */
 public boolean verifyPaswoord(String paswoord) {
   return PasswordHash.validatePassword(paswoord, this.paswoord);
 }