package com.xjrsoft.xjrsoftboot;

import cn.dev33.satoken.secure.BCrypt;
import org.junit.Test;

public class bcrypt {

    @Test
    public void TestBcrypt(){
        String pwd = "Aa123456.";
        String pw_hash = BCrypt.hashpw(pwd, BCrypt.gensalt());
        System.out.println(pw_hash);

        if (BCrypt.checkpw(pwd, pw_hash))
            System.out.println("It matches");
        else
            System.out.println("It does not match");
    }
}
