age

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Ext is the file extension for age encrypted secrets
	Ext = "age"
	// IDFile is the name for age recipients
	IDFile = ".age-ids"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Age

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

Age is an age backend

func New

func New() (*Age, error)

New creates a new Age backend

func (*Age) CreatePrivateKey

func (a *Age) CreatePrivateKey(ctx context.Context) error

CreatePrivateKey is TODO

func (*Age) CreatePrivateKeyBatch

func (a *Age) CreatePrivateKeyBatch(ctx context.Context, name, email, pw string) error

CreatePrivateKeyBatch will create a new native private key

func (*Age) Decrypt

func (a *Age) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error)

Decrypt will attempt to decrypt the given payload

func (*Age) EmailFromKey

func (a *Age) EmailFromKey(context.Context, string) string

EmailFromKey is TODO

func (*Age) Encrypt

func (a *Age) Encrypt(ctx context.Context, plaintext []byte, recipients []string) ([]byte, error)

Encrypt will encrypt the given payload

func (*Age) ExportPublicKey

func (a *Age) ExportPublicKey(ctx context.Context, id string) ([]byte, error)

ExportPublicKey is not implemented

func (*Age) Ext

func (a *Age) Ext() string

Ext returns the extension

func (*Age) FindPrivateKeys

func (a *Age) FindPrivateKeys(ctx context.Context, keys ...string) ([]string, error)

FindPrivateKeys is TODO

func (*Age) FindPublicKeys

func (a *Age) FindPublicKeys(ctx context.Context, keys ...string) ([]string, error)

FindPublicKeys it TODO

func (*Age) Fingerprint

func (a *Age) Fingerprint(ctx context.Context, id string) string

Fingerprint is TODO

func (*Age) FormatKey

func (a *Age) FormatKey(ctx context.Context, id string) string

FormatKey is TODO

func (*Age) IDFile

func (a *Age) IDFile() string

IDFile return the recipients file

func (*Age) ImportPublicKey

func (a *Age) ImportPublicKey(ctx context.Context, buf []byte) error

ImportPublicKey is TODO

func (*Age) Initialized

func (a *Age) Initialized(ctx context.Context) error

Initialized returns nil

func (*Age) ListPrivateKeyIDs

func (a *Age) ListPrivateKeyIDs(ctx context.Context) ([]string, error)

ListPrivateKeyIDs is TODO

func (*Age) ListPublicKeyIDs

func (a *Age) ListPublicKeyIDs(context.Context) ([]string, error)

ListPublicKeyIDs is TODO

func (*Age) Name

func (a *Age) Name() string

Name returns age

func (*Age) NameFromKey

func (a *Age) NameFromKey(context.Context, string) string

NameFromKey is TODO

func (*Age) ReadNamesFromKey

func (a *Age) ReadNamesFromKey(ctx context.Context, buf []byte) ([]string, error)

ReadNamesFromKey is TODO

func (*Age) RecipientIDs

func (a *Age) RecipientIDs(ctx context.Context, buf []byte) ([]string, error)

RecipientIDs is TODO

func (*Age) Sign

func (a *Age) Sign(ctx context.Context, in string, sigf string) error

Sign is TODO

func (*Age) Version

func (a *Age) Version(ctx context.Context) semver.Version

Version return 1.0.0

Jump to

Keyboard shortcuts

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