agessh

package
v1.0.0-beta3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package agessh provides age.Identity and age.Recipient implementations of types "ssh-rsa" and "ssh-ed25519", which allow reusing existing SSH key files for encryption with age-encryption.org/v1.

These should only be used for compatibility with existing keys, and native X25519 keys should be preferred otherwise.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseIdentity

func ParseIdentity(pemBytes []byte) (age.Identity, error)

func ParseRecipient

func ParseRecipient(s string) (age.Recipient, error)

Types

type Ed25519Identity

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

func NewEd25519Identity

func NewEd25519Identity(key ed25519.PrivateKey) (*Ed25519Identity, error)

func (*Ed25519Identity) Type

func (*Ed25519Identity) Type() string

func (*Ed25519Identity) Unwrap

func (i *Ed25519Identity) Unwrap(block *format.Recipient) ([]byte, error)

type Ed25519Recipient

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

func NewEd25519Recipient

func NewEd25519Recipient(pk ssh.PublicKey) (*Ed25519Recipient, error)

func (*Ed25519Recipient) Type

func (*Ed25519Recipient) Type() string

func (*Ed25519Recipient) Wrap

func (r *Ed25519Recipient) Wrap(fileKey []byte) (*format.Recipient, error)

type RSAIdentity

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

func NewRSAIdentity

func NewRSAIdentity(key *rsa.PrivateKey) (*RSAIdentity, error)

func (*RSAIdentity) Type

func (*RSAIdentity) Type() string

func (*RSAIdentity) Unwrap

func (i *RSAIdentity) Unwrap(block *format.Recipient) ([]byte, error)

type RSARecipient

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

func NewRSARecipient

func NewRSARecipient(pk ssh.PublicKey) (*RSARecipient, error)

func (*RSARecipient) Type

func (*RSARecipient) Type() string

func (*RSARecipient) Wrap

func (r *RSARecipient) Wrap(fileKey []byte) (*format.Recipient, error)

Jump to

Keyboard shortcuts

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