MCPcopy Create free account
hub / github.com/Driver-C/tryssh / NewEncryptCommand

Function NewEncryptCommand

cmd/encrypt/encrypt.go:32–42  ·  view source on GitHub ↗

NewEncryptCommand creates and returns the cobra command for encrypting config passwords.

()

Source from the content-addressed store, hash-verified

30
31// NewEncryptCommand creates and returns the cobra command for encrypting config passwords.
32func NewEncryptCommand() *cobra.Command {
33 cmd := &cobra.Command{
34 Use: "encrypt",
35 Short: "Encrypt passwords in the configuration file",
36 Long: "Encrypt all plaintext passwords in the configuration file using a master password. Encrypted passwords are prefixed with 'enc:'.",
37 Run: func(_ *cobra.Command, _ []string) {
38 runEncrypt()
39 },
40 }
41 return cmd
42}
43
44func runEncrypt() {
45 // Check if env var is already set — skip interactive prompt

Callers 3

NewTrysshCommandFunction · 0.92

Calls 1

runEncryptFunction · 0.85

Tested by 2