mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-16 04:36:35 +08:00
feat: 资源密码加密处理&登录密码加密加强等
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/common/utils"
|
||||
"mayfly-go/pkg/model"
|
||||
)
|
||||
|
||||
@@ -24,3 +25,13 @@ const (
|
||||
RedisModeStandalone = "standalone"
|
||||
RedisModeCluster = "cluster"
|
||||
)
|
||||
|
||||
func (r *Redis) PwdEncrypt() {
|
||||
// 密码替换为加密后的密码
|
||||
r.Password = utils.PwdAesEncrypt(r.Password)
|
||||
}
|
||||
|
||||
func (r *Redis) PwdDecrypt() {
|
||||
// 密码替换为解密后的密码
|
||||
r.Password = utils.PwdAesDecrypt(r.Password)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user