Package uk.org.woodcraft.bookings.auth

Source Code of uk.org.woodcraft.bookings.auth.PasswordUtils

package uk.org.woodcraft.bookings.auth;

import org.jasypt.util.password.BasicPasswordEncryptor;

public class PasswordUtils {

  public static String encodePassword(String password)
  {
    BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
    String encryptedPassword = passwordEncryptor.encryptPassword(password);
   
    return encryptedPassword;
  }
 
  public static boolean checkPassword(String plainPassword, String encryptedPassword)
  {
    BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
    return (passwordEncryptor.checkPassword(plainPassword, encryptedPassword));
  }
}
TOP

Related Classes of uk.org.woodcraft.bookings.auth.PasswordUtils

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.