添加使用案例

This commit is contained in:
click33 2022-01-24 18:08:07 +08:00
parent ce277bfbc2
commit 0163044a7c
4 changed files with 13 additions and 13 deletions

View File

@ -191,7 +191,6 @@ public class BCrypt {
* @return an array containing the decoded bytes
* @throws IllegalArgumentException if maxolen is invalid
*/
@SuppressWarnings("SameParameterValue")
private static byte[] decodeBase64(String s, int maxolen) throws IllegalArgumentException {
final StringBuilder rs = new StringBuilder();
int off = 0, slen = s.length(), olen = 0;

View File

@ -144,13 +144,12 @@ StpUtil.switchTo(10044); // 将当前会话身份临时切换为其它账号
- **[ helio-starters ]**[ 基于JDK15 + Spring Boot 2.4 + Sa-Token + Mybatis-Plus的单体Boot版脚手架和微服务Cloud版脚手架带有配套后台管理前端模板及代码生成器](https://gitee.com/uncarbon97/helio-starters)
- **[ sa-token-plugin ]**[Sa-Token第三方插件实现基于Sa-Token-Core提供一些与官方不同实现机制的的插件集合作为Sa-Token开源生态的补充](https://gitee.com/bootx/sa-token-plugin)
- **[ easy-admin ]**[一个基于SpringBoot2 + Sa-Token + Mybatis-Plus + Snakerflow + Layui 的后台管理系统,灵活多变可前后端分离,也可单体,内置代码生成器、权限管理、工作流引擎等](https://gitee.com/lakernote/easy-admin)
- **[ RuoYi-Vue-Plus ]**[基于 RuoYi-Vue 集成 SaToken + Lombok + Mybatis-Plus + Undertow + knife4j + Hutool + Feign 重写所有原生业务 定期与 RuoYi-Vue 同步](https://gitee.com/JavaLionLi/RuoYi-Vue-Plus/tree/satoken/)
如果您的项目使用了Sa-Token欢迎提交pr
更多请参考:[Sa-Token 生态](/more/link)
## 友情链接
- **[ OkHttps ]**[ 一个轻量级http通信框架API设计无比优雅支持 WebSocket 以及 Stomp 协议](https://gitee.com/ejlchina-zhxu/okhttps)

View File

@ -49,6 +49,8 @@
- **[ spba-admin ]**[基于SpringBoot、Vue开发的通用后台管理系统做到开箱即用为新项目开发省去了基础功能开发的步骤。主要使用Sa-Token权限认证、MyBatis-Plus、MySQL、Redis、validation、七牛云等技术。](https://gitee.com/qkdja/spring-boot-admin)
- **[ QForum-Core ]**[QForum 论坛系统官方核心,可拓展性强、轻量级、高性能、前后端分离,基于 SpringBoot2 + Sa-Token + Mybatis-Plus](https://github.com/Project-QForum/QForum-Core/)
<br>

View File

@ -4,18 +4,18 @@ import org.junit.Assert;
import org.junit.Test;
/**
* BCrypt 加密测试
*
* @author dream.
* @className BCryptTest
* @description TODO 类描述
* @date 2022/1/20
**/
public class BCryptTest {
@Test
public void checkpwTest() {
final String hashed = BCrypt.hashpw("12345");
System.out.println(hashed);
Assert.assertTrue(BCrypt.checkpw("12345", hashed));
Assert.assertFalse(BCrypt.checkpw("123456", hashed));
}
@Test
public void checkpwTest() {
final String hashed = BCrypt.hashpw("12345");
System.out.println(hashed);
Assert.assertTrue(BCrypt.checkpw("12345", hashed));
Assert.assertFalse(BCrypt.checkpw("123456", hashed));
}
}