2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

fix: 加解密

This commit is contained in:
耗子
2024-12-15 23:04:50 +08:00
parent cd1d7c9757
commit 2050a96dcf
5 changed files with 51 additions and 34 deletions

View File

@@ -3,4 +3,4 @@ package bootstrap
import "github.com/google/wire"
// ProviderSet is bootstrap providers.
var ProviderSet = wire.NewSet(NewConf, NewLog, NewCli, NewValidator, NewRouter, NewHttp, NewDB, NewMigrate, NewSession, NewCron, NewQueue, NewCrypter)
var ProviderSet = wire.NewSet(NewConf, NewLog, NewCli, NewValidator, NewRouter, NewHttp, NewDB, NewMigrate, NewSession, NewCron, NewQueue)

View File

@@ -1,10 +0,0 @@
package bootstrap
import (
"github.com/go-rat/utils/crypt"
"github.com/knadh/koanf/v2"
)
func NewCrypter(conf *koanf.Koanf) (crypt.Crypter, error) {
return crypt.NewXChacha20Poly1305([]byte(conf.MustString("app.key")))
}