Examples of checkPassword()


Examples of org.jasypt.util.password.BasicPasswordEncryptor.checkPassword()

    // "Encrypt password", is not an real encryption because "Encryptor"
    // generate a digest. by default the MD5 algorithm is used
    String encryptedPassword = bpe.encryptPassword(TEXT_TO_ENCRYPT);
    System.out.printf("testPasswordEncryptionUsingBasicEncryptor : '%s' become '%s'\n", TEXT_TO_ENCRYPT, encryptedPassword);
    // Valid "encrypted" password
    Assert.assertTrue(bpe.checkPassword(TEXT_TO_ENCRYPT, encryptedPassword));
  }

  /**
   * This test show how encrypt a password using a strong encryptor, same
   * stuff is provided for Number encryption, see StrongInteger* and
 
View Full Code Here

Examples of org.jasypt.util.password.BasicPasswordEncryptor.checkPassword()

            BasicPasswordEncryptor  encriptador = new BasicPasswordEncryptor();

            //FIXME: duda como hacer esto más seguro
        if (usuario != null) {
                // Comprobamos la clave
                if (encriptador.checkPassword( password, usuario.getPassword())) {
                    // Rellenamos la información del log
                    logger.info("Login correcto del usuario: " + usuarioLogin);

                    // Metemos en sesión el usuario actual
                    request.getSession().setAttribute(Constantes.USER_INFO,
View Full Code Here

Examples of org.jasypt.util.password.BasicPasswordEncryptor.checkPassword()

  public boolean matchPassword(String password) {
    PasswordEncryptor encryptor = new BasicPasswordEncryptor();

    try {
      return encryptor.checkPassword(password, this.password);
    } catch (EncryptionOperationNotPossibleException ex) {
      return false;
    }
  }
View Full Code Here

Examples of org.jasypt.util.password.BasicPasswordEncryptor.checkPassword()

  public Users loginCheck(String id, String pass) {
       
    Users validate = usersRepository.findOne(id);
   
    BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
    if ((validate != null && validate.getEnabled()) && passwordEncryptor.checkPassword(pass, validate.getPassword())){
      return validate;
    } else{
      return null;
    }
  }
View Full Code Here

Examples of org.jasypt.util.password.ConfigurablePasswordEncryptor.checkPassword()

    // "Encrypt password", is not an real encryption because "Encryptor"
    // generate a digest
    String encryptedPassword = pe.encryptPassword(TEXT_TO_ENCRYPT);
    System.out.printf("testPasswordEncryptionUsingConfigurableEncryptor : '%s' become '%s'\n", TEXT_TO_ENCRYPT, encryptedPassword);
    // Valid "encrypted" password
    Assert.assertTrue(pe.checkPassword(TEXT_TO_ENCRYPT, encryptedPassword));
  }

  /**
   * This test show how encrypt a text using a basic encryptor (using symetric
   * key)
 
View Full Code Here

Examples of org.jasypt.util.password.PasswordEncryptor.checkPassword()

  public boolean matchPassword(String password) {
    PasswordEncryptor encryptor = new BasicPasswordEncryptor();

    try {
      return encryptor.checkPassword(password, this.password);
    } catch (EncryptionOperationNotPossibleException ex) {
      return false;
    }
  }
View Full Code Here

Examples of org.jasypt.util.password.StrongPasswordEncryptor.checkPassword()

    StrongPasswordEncryptor passwordEncryptor = new StrongPasswordEncryptor();

    // Check the password against all matching Users
    for (User user : users) {
      if (passwordEncryptor.checkPassword(passwordDigest, user.getPasswordDigest())) {
        return Optional.of(initialized(user));
      }
    }

    // Must have failed to be here
View Full Code Here

Examples of org.jasypt.util.password.StrongPasswordEncryptor.checkPassword()

    // "Encrypt password", is not an real encryption because "Encryptor"
    // generate a digest. by default the SHA-256 algorithm is used
    String encryptedPassword = pe.encryptPassword(TEXT_TO_ENCRYPT);
    System.out.printf("testPasswordEncryptionUsingStrongEncryptor : '%s' become '%s'\n", TEXT_TO_ENCRYPT, encryptedPassword);
    // Valid "encrypted" password
    Assert.assertTrue(pe.checkPassword(TEXT_TO_ENCRYPT, encryptedPassword));
  }

  /**
   * This test show how encrypt a password using a configurable encryptor.
   *
 
View Full Code Here

Examples of org.jasypt.util.password.StrongPasswordEncryptor.checkPassword()

        final String passw2 = "cry301"; // NOPMD by r39 on 3/30/11 1:28 PM

        final String encrypted1 = bpe.encryptPassword(passw1);
        final String encrypted2 = bpe.encryptPassword(passw2);

        logger.debug(bpe.checkPassword(passw1, encrypted1));
        logger.debug(bpe.checkPassword(passw1, encrypted2));
        logger.debug(bpe.checkPassword(passw2, encrypted1));
        logger.debug(bpe.checkPassword(passw2, encrypted2));

        logger.debug(encrypted1.length());
View Full Code Here

Examples of org.jasypt.util.password.StrongPasswordEncryptor.checkPassword()

        final String encrypted1 = bpe.encryptPassword(passw1);
        final String encrypted2 = bpe.encryptPassword(passw2);

        logger.debug(bpe.checkPassword(passw1, encrypted1));
        logger.debug(bpe.checkPassword(passw1, encrypted2));
        logger.debug(bpe.checkPassword(passw2, encrypted1));
        logger.debug(bpe.checkPassword(passw2, encrypted2));

        logger.debug(encrypted1.length());
        logger.debug(encrypted2.length());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.