mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: login 2fa
This commit is contained in:
parent
8d8ba150ef
commit
5abd9b75bb
33 changed files with 1063 additions and 122 deletions
14
settings/crypto.go
Normal file
14
settings/crypto.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package settings
|
||||
|
||||
import "crypto/md5"
|
||||
|
||||
type Crypto struct {
|
||||
Secret string
|
||||
}
|
||||
|
||||
var CryptoSettings = Crypto{}
|
||||
|
||||
func (c *Crypto) GetSecretMd5() []byte {
|
||||
k := md5.Sum([]byte(c.Secret))
|
||||
return k[:]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue