ssh

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoPEMError = errors.New("not a PEM file")

Functions

func FormatPublicEd25519 added in v0.1.11

func FormatPublicEd25519(pub *crypto.PublicKey) string

func ParsePrivateKeyFile added in v0.1.16

func ParsePrivateKeyFile(ascii []byte) (crypto.PublicKey, *crypto.Ed25519Signer, error)

func ParsePublicEd25519 added in v0.1.10

func ParsePublicEd25519(asciiKey string) (crypto.PublicKey, error)

func ParseSignatureFile added in v0.1.11

func ParseSignatureFile(ascii []byte, pub *crypto.PublicKey, namespace string) (crypto.Signature, error)

func SignedData

func SignedData(namespace string, msg []byte) []byte

func SignedDataFromHash

func SignedDataFromHash(namespace string, hash *crypto.Hash) []byte

func WritePrivateKeyFile added in v0.1.16

func WritePrivateKeyFile(w io.Writer, signer *crypto.Ed25519Signer) error

func WriteSignatureFile added in v0.1.11

func WriteSignatureFile(w io.Writer, publicKey *crypto.PublicKey, namespace string, signature *crypto.Signature) error

Types

type Connection added in v0.1.10

type Connection struct {
	// contains filtered or unexported fields
}

func Connect added in v0.1.10

func Connect() (*Connection, error)

func ConnectTo added in v0.1.10

func ConnectTo(sockName string) (*Connection, error)

func (Connection) NewSigner added in v0.1.10

func (c Connection) NewSigner(publicKey *crypto.PublicKey) (*Signer, error)

func (Connection) SignEd25519 added in v0.1.10

func (c Connection) SignEd25519(publicKey *crypto.PublicKey, msg []byte) (crypto.Signature, error)

type Signer added in v0.1.10

type Signer struct {
	// contains filtered or unexported fields
}

func (*Signer) Public added in v0.1.10

func (s *Signer) Public() crypto.PublicKey

func (*Signer) Sign added in v0.1.10

func (s *Signer) Sign(message []byte) (crypto.Signature, error)

Jump to

Keyboard shortcuts

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