cas 加盐处理

CAS Authentication Credentials

#cas.authn.accept.users=casuser::Mellon

3、加盐处理

##Encode Database Authentication 开始

#加密次数

cas.authn.jdbc.encode[0].numberOfIterations=2

#该列名的值可替代上面的值,但对密码加密时必须取该值进行处理

cas.authn.jdbc.encode[0].numberOfIterationsFieldName=

盐值固定列

cas.authn.jdbc.encode[0].saltFieldName=username

#静态盐值

cas.authn.jdbc.encode[0].staticSalt=.

cas.authn.jdbc.encode[0].sql=select * from ca_user where username=?

#对处理盐值后的算法

cas.authn.jdbc.encode[0].algorithmName=MD5

cas.authn.jdbc.encode[0].passwordFieldName=password

cas.authn.jdbc.encode[0].expiredFieldName=expired

cas.authn.jdbc.encode[0].disabledFieldName=disabled

##数据库连接

cas.authn.jdbc.encode[0].url=jdbc:mysql://localhost:33062/cs_das?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai

cas.authn.jdbc.encode[0].dialect=org.hibernate.dialect.MySQLDialect

cas.authn.jdbc.encode[0].driverClass=com.mysql.cj.jdbc.Driver

cas.authn.jdbc.encode[0].user=root

cas.authn.jdbc.encode[0].password=123456

复制代码
Md5Hash hash = new Md5Hash("123",".admin",2);
 System.out.println("对密码123加盐.admin后的密码:" + hash.toHex());
相关推荐
麦兜*16 分钟前
Spring Boot 整合量子密钥分发(QKD)实验方案
java·jvm·spring boot·后端·spring·spring cloud·maven
码破苍穹ovo1 小时前
堆----1.数组中的第K个最大元素
java·数据结构·算法·排序算法
2301_793086871 小时前
JVM 01 运行区域
java·开发语言
崎岖Qiu1 小时前
【JVM篇13】:兼顾吞吐量和低停顿的G1垃圾回收器
java·jvm·后端·面试
久念祈2 小时前
C++ - 仿 RabbitMQ 实现消息队列--服务端核心模块实现(五)
java·rabbitmq·java-rabbitmq
超级晒盐人5 小时前
用落霞归雁的思维框架推导少林寺用什么数据库?
java·python·系统架构·学习方法·教育电商
岁忧5 小时前
(LeetCode 面试经典 150 题) 138. 随机链表的复制 (哈希表)
java·c++·leetcode·链表·面试·go
鹦鹉0075 小时前
IO流中的字节流
java·开发语言·后端
你我约定有三5 小时前
分布式微服务--Nacos作为配置中心(二)
java·分布式·spring cloud·微服务·架构·wpf·负载均衡
qq_165706075 小时前
java实现运行SQL脚本完成数据迁移
java·sql