版本封存

This commit is contained in:
zeaslity
2025-12-06 11:26:05 +08:00
parent 13949e1ba8
commit c0ae5e30c4
57 changed files with 2443 additions and 1428 deletions

View File

@@ -0,0 +1,18 @@
package services
import (
"cmii-uav-watchdog-common/totp_tier_one"
"cmii-uav-watchdog-otp/totp"
"log"
)
// GenerateTierOneTOTPSecret 生成一级TOTP密钥 只能center调用
func GenerateTierOneTOTPSecret() (string, error) {
secret, err := totp.Generate(totp_tier_one.TierOneTOTPSecretOpts)
if err != nil {
log.Printf("生成TOTP密钥失败: %v", err)
return "", err
}
return secret.Secret(), nil
}