MCPcopy
hub / github.com/nats-io/nats.go / nkeyPairFromSeedFile

Function nkeyPairFromSeedFile

nats.go:6672–6679  ·  view source on GitHub ↗
(seedFile string)

Source from the content-addressed store, hash-verified

6670}
6671
6672func nkeyPairFromSeedFile(seedFile string) (nkeys.KeyPair, error) {
6673 contents, err := os.ReadFile(seedFile)
6674 if err != nil {
6675 return nil, fmt.Errorf("nats: %w", err)
6676 }
6677 defer wipeSlice(contents)
6678 return nkeys.ParseDecoratedNKey(contents)
6679}
6680
6681// Sign authentication challenges from the server.
6682// Do not keep private seed in memory.

Callers 2

NkeyOptionFromSeedFunction · 0.85
sigHandlerFunction · 0.85

Calls 2

wipeSliceFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected