增加密码加密存储的功能,老用户不影响,但更新后自动加密存储

This commit is contained in:
wsczx
2024-10-26 18:32:47 +08:00
parent fdc755bd98
commit 34e555c70c
2 changed files with 31 additions and 11 deletions

View File

@@ -400,12 +400,3 @@ func buildNameToCertificate(cert *tls.Certificate) {
nameToCertificate[san] = cert
}
}
// func Scrypt(passwd string) string {
// salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b}
// hashPasswd, err := scrypt.Key([]byte(passwd), salt, 1<<15, 8, 1, 32)
// if err != nil {
// return err.Error()
// }
// return base64.StdEncoding.EncodeToString(hashPasswd)
// }