Documentation ¶
Index ¶
- func GenerateKey(rand io.Reader) (*PublicKey, *PrivateKey, error)
- func MarshalPrivateKey(priv *PrivateKey, rand io.Reader, passphrase []byte, rounds int) ([]byte, error)
- func MarshalPublicKey(pub *PublicKey) []byte
- func MarshalSignature(sig *Signature) []byte
- func ReadFile(r io.Reader) (comment string, content []byte, err error)
- func Verify(pub *PublicKey, msg []byte, sig *Signature) bool
- func WriteFile(w io.Writer, comment string, content []byte) error
- type PrivateKey
- type PublicKey
- type Signature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey(rand io.Reader) (*PublicKey, *PrivateKey, error)
func MarshalPrivateKey ¶
func MarshalPublicKey ¶
func MarshalSignature ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct { Bytes [ed25519.PrivateKeySize]byte Fingerprint [8]byte }
func ParsePrivateKey ¶
func ParsePrivateKey(data, passphrase []byte) (*PrivateKey, error)
type PublicKey ¶
type PublicKey struct { Bytes [ed25519.PublicKeySize]byte Fingerprint [8]byte }
func ParsePublicKey ¶
Click to show internal directories.
Click to hide internal directories.