ssh

package
v2.167.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

This section is empty.

Types

type Config

type Config struct {
	Public  string `yaml:"public,omitempty" json:"public,omitempty" toml:"public,omitempty"`
	Private string `yaml:"private,omitempty" json:"private,omitempty" toml:"private,omitempty"`
}

Config for ssh.

func (*Config) IsEnabled added in v2.115.0

func (c *Config) IsEnabled() bool

IsEnabled for ssh.

func (*Config) PrivateKey

func (c *Config) PrivateKey(fs *os.FS) (ed25519.PrivateKey, error)

PrivateKey ssh.

func (*Config) PublicKey

func (c *Config) PublicKey(fs *os.FS) (ed25519.PublicKey, error)

PublicKey ssh.

type Generator

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

Generator for ssh.

func NewGenerator

func NewGenerator(generator *rand.Generator) *Generator

NewGenerator for ssh.

func (*Generator) Generate

func (g *Generator) Generate() (string, string, error)

Generate key pair with ssh.

type Signer

type Signer struct {
	PrivateKey ed25519.PrivateKey
}

Signer for ssh.

func NewSigner

func NewSigner(fs *os.FS, cfg *Config) (*Signer, error)

NewSigner for ssh.

func (*Signer) Sign

func (s *Signer) Sign(msg []byte) ([]byte, error)

Sign for ssh.

type Verifier

type Verifier struct {
	PublicKey ed25519.PublicKey
}

Verifier for ssh.

func NewVerifier

func NewVerifier(fs *os.FS, cfg *Config) (*Verifier, error)

NewVerifier for ssh.

func (*Verifier) Verify

func (v *Verifier) Verify(sig, msg []byte) error

Verify for ssh.

Jump to

Keyboard shortcuts

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