feat: login 2fa

This commit is contained in:
Jacky 2024-07-23 17:28:13 +08:00
parent 8d8ba150ef
commit 5abd9b75bb
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
33 changed files with 1063 additions and 122 deletions

14
settings/crypto.go Normal file
View 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[:]
}