signify

package module
v0.0.0-...-944db0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2020 License: BSD-2-Clause Imports: 12 Imported by: 4

README

signify

Go implementation of OpenBSD's signify(1)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey(rand io.Reader) (*PublicKey, *PrivateKey, error)

func MarshalPrivateKey

func MarshalPrivateKey(priv *PrivateKey, rand io.Reader, passphrase []byte, rounds int) ([]byte, error)

func MarshalPublicKey

func MarshalPublicKey(pub *PublicKey) []byte

func MarshalSignature

func MarshalSignature(sig *Signature) []byte

func ReadFile

func ReadFile(r io.Reader) (comment string, content []byte, err error)

func Verify

func Verify(pub *PublicKey, msg []byte, sig *Signature) bool

func WriteFile

func WriteFile(w io.Writer, comment string, content []byte) error

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

func ParsePublicKey(data []byte) (*PublicKey, error)

type Signature

type Signature struct {
	Bytes       [ed25519.SignatureSize]byte
	Fingerprint [8]byte
}

func ParseSignature

func ParseSignature(data []byte) (*Signature, error)

func Sign

func Sign(priv *PrivateKey, msg []byte) *Signature

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL