mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 20:47:18 +08:00
11 lines
226 B
Go
11 lines
226 B
Go
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")))
|
|
}
|