age

package
v0.0.0-...-381c4e2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Age

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

func Generate

func Generate(basePath string) (a *Age, err error)

func MakeFromIdentity

func MakeFromIdentity(identity Identity, path string) (a *Age, err error)

func MakeFromIdentityFile

func MakeFromIdentityFile(basePath string) (a *Age, err error)

func MakeFromIdentityPathOrString

func MakeFromIdentityPathOrString(path_or_identity string) (a *Age, err error)

func MakeFromIdentityString

func MakeFromIdentityString(contents string) (a *Age, err error)

func (*Age) AddIdentity

func (a *Age) AddIdentity(
	identity Identity,
) (err error)

func (*Age) AddIdentityOrGenerateIfNecessary

func (a *Age) AddIdentityOrGenerateIfNecessary(
	identity Identity,
	path string,
) (err error)

func (*Age) Close

func (a *Age) Close() error

func (*Age) Decrypt

func (a *Age) Decrypt(src io.Reader) (out io.Reader, err error)

func (*Age) Encrypt

func (a *Age) Encrypt(dst io.Writer) (out io.WriteCloser, err error)

func (*Age) Identities

func (a *Age) Identities() []age.Identity

func (*Age) Recipients

func (a *Age) Recipients() []Recipient

type Identity

type Identity struct {
	age.Recipient
	// contains filtered or unexported fields
}

func (*Identity) GenerateIfNecessary

func (i *Identity) GenerateIfNecessary(basePath string) (err error)

func (*Identity) IsDisabled

func (i *Identity) IsDisabled() bool

func (*Identity) IsEmpty

func (i *Identity) IsEmpty() bool

func (*Identity) Set

func (i *Identity) Set(path_or_identity string) (err error)

func (*Identity) SetFromPath

func (i *Identity) SetFromPath(path string) (err error)

func (*Identity) SetFromX25519Identity

func (i *Identity) SetFromX25519Identity(identity string) (err error)

func (*Identity) SetX25519Identity

func (i *Identity) SetX25519Identity(x *age.X25519Identity)

func (*Identity) String

func (i *Identity) String() string

func (*Identity) WriteToPathIfNecessary

func (i *Identity) WriteToPathIfNecessary(basePath string) (err error)

type Recipient

type Recipient = age.Recipient

type X25519Identity

type X25519Identity = age.X25519Identity

type X25519Recipient

type X25519Recipient = age.X25519Recipient

Jump to

Keyboard shortcuts

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