INNER CODE UNIT · Go
PrivateKeyFromFile
aead/minisign · private.go:28
func PrivateKeyFromFile(password, path string) (PrivateKey, error) {
bytes, err := os.ReadFile(path)
if err != nil {
return PrivateKey{}, err
}
return DecryptKey(password, bytes)
}
// PrivateKey is a minisign private key.
//
// A private key can sign messages to prove their origin and authenticity.
//
// PrivateKey implements the crypto.Signer interface.
type PrivateKey struct {
_ [0]func() // prevent direct comparison: p1 == p2.
id uint64
bytes [ed25519.PrivateKeySize]byte