age

package
v0.0.0-...-791c77c Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNoIdentityMatchError

func IsNoIdentityMatchError(err error) bool

Types

type Age

type Age struct {
	// Recipients []Recipient `toml:"recipients,omitempty"`
	Identities []*Identity `toml:"identities,omitempty"`
}

func MakeFromIdentity

func MakeFromIdentity(identity Identity) (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,
) (err error)

func (*Age) GetBlobEncryption

func (a *Age) GetBlobEncryption() interfaces.BlobEncryption

func (*Age) GetRecipients

func (a *Age) GetRecipients() []age.Recipient

func (*Age) Set

func (a *Age) Set(v string) (err error)

TODO add support for recipients in addition to identities

func (*Age) String

func (a *Age) String() string

func (*Age) WrapReader

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

func (*Age) WrapWriter

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

type Identity

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

func (*Identity) GenerateIfNecessary

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

func (*Identity) IsDisabled

func (i *Identity) IsDisabled() bool

func (*Identity) IsEmpty

func (i *Identity) IsEmpty() bool

func (*Identity) MarshalText

func (i *Identity) MarshalText() (b []byte, err error)

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) UnmarshalText

func (i *Identity) UnmarshalText(b []byte) (err error)

func (Identity) Unwrap

func (i Identity) Unwrap(stanzas []*age.Stanza) (fileKey []byte, err error)

type NoIdentityMatchError

type NoIdentityMatchError = age.NoIdentityMatchError

type Recipient

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

type Recipients

type Recipients []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