MCPcopy Create free account
hub / github.com/Mister-leo/fssh / runLegacyInit

Function runLegacyInit

cmd/fssh/main.go:85–100  ·  view source on GitHub ↗

runLegacyInit executes the original non-interactive initialization

(force bool, mode string, seedTTL int, algorithm string, digits int)

Source from the content-addressed store, hash-verified

83
84// runLegacyInit executes the original non-interactive initialization
85func runLegacyInit(force bool, mode string, seedTTL int, algorithm string, digits int) {
86 // Default to touchid if mode not specified
87 if mode == "" {
88 mode = "touchid"
89 }
90
91 // 根据模式选择初始化方式
92 switch mode {
93 case "touchid":
94 initTouchIDMode(force)
95 case "otp":
96 initOTPMode(force, seedTTL, algorithm, digits)
97 default:
98 fatal(fmt.Errorf("不支持的认证模式: %s (支持 touchid 或 otp)", mode))
99 }
100}
101
102func cmdImport() {
103 fs := flag.NewFlagSet("import", flag.ExitOnError)

Callers 1

cmdInitFunction · 0.85

Calls 3

initTouchIDModeFunction · 0.85
initOTPModeFunction · 0.85
fatalFunction · 0.85

Tested by

no test coverage detected