(seedFile string)
| 6670 | } |
| 6671 | |
| 6672 | func 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. |
no test coverage detected