package utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @ClassName PasswordEncode
 * @Author zzrdark
 * @Date 2020-03-11 17:53
 * @Description TODO
 **/
public class PasswordEncode {
    public static void main(String[] args) {
        String password = "123456";
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        String enPassword1 = encoder.encode(password);
        String enPassword2 = encoder.encode(password);
        System.out.println(enPassword1);
        System.out.println(encoder.matches(password,enPassword1));
        System.out.println(encoder.matches(password,enPassword2));

    }
}
