mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-04 21:55:48 +08:00
refactor: slog替换logrus、日志操作统一、支持json、text格式等
This commit is contained in:
@@ -21,6 +21,9 @@ func (a *Aes) DecryptBase64(data string) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (j *Aes) Valid() {
|
||||
if j.Key == "" {
|
||||
return
|
||||
}
|
||||
aesKeyLen := len(j.Key)
|
||||
assert.IsTrue(aesKeyLen == 16 || aesKeyLen == 24 || aesKeyLen == 32,
|
||||
fmt.Sprintf("config.yml之 [aes.key] 长度需为16、24、32位长度, 当前为%d位", aesKeyLen))
|
||||
|
||||
Reference in New Issue
Block a user