MCPcopy
hub / github.com/smallstep/cli / ReadStringPasswordFromFile

Function ReadStringPasswordFromFile

utils/read.go:66–72  ·  view source on GitHub ↗

ReadStringPasswordFromFile reads and returns the password from the given filename. The contents of the file will be trimmed at the right.

(filename string)

Source from the content-addressed store, hash-verified

64// ReadStringPasswordFromFile reads and returns the password from the given filename.
65// The contents of the file will be trimmed at the right.
66func ReadStringPasswordFromFile(filename string) (string, error) {
67 b, err := ReadPasswordFromFile(filename)
68 if err != nil {
69 return "", err
70 }
71 return string(b), nil
72}
73
74// ReadInput from stdin if something is detected or ask the user for an input
75// using the given prompt.

Callers 10

createActionFunction · 0.92
decryptActionFunction · 0.92
createActionFunction · 0.92
p12ActionFunction · 0.92
initActionFunction · 0.92
updateJWKDetailsFunction · 0.92
createJWKDetailsFunction · 0.92
updateActionFunction · 0.92
addActionFunction · 0.92

Calls 1

ReadPasswordFromFileFunction · 0.85

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…