crypt

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VaultTag    = "!vault"
	AgeTag      = "!age"
	TripleQuote = "\"\"\""
)

Variables

This section is empty.

Functions

func IdentitiesFromStrings

func IdentitiesFromStrings(workingDir string, keys []string) (ids []age.Identity, recipients []age.Recipient, err error)

func ParsePrivateKey

func ParsePrivateKey(arg string) ([]age.Identity, []age.Recipient, error)

func ParsePublicKey

func ParsePublicKey(arg string) (recipients []age.Recipient, err error)

func RecipientsFromStrings

func RecipientsFromStrings(workingDir string, keys []string) (ret []age.Recipient, err error)

func SSHParseIdentity added in v1.0.4

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

Types

type CryptBlock added in v1.0.1

type CryptBlock struct {
	Match   string
	Mode    string
	Spacing string
	Value   string
	// contains filtered or unexported fields
}

func NewCryptBlock added in v1.0.1

func NewCryptBlock(matches []string) *CryptBlock

func (*CryptBlock) Decrypt added in v1.0.1

func (cb *CryptBlock) Decrypt(identities []age.Identity, vaultKey string) error

func (*CryptBlock) Encrypt added in v1.0.1

func (cb *CryptBlock) Encrypt(recipients []age.Recipient, vaultKey string) error

func (CryptBlock) String added in v1.0.1

func (cb CryptBlock) String(forEditing bool) string

type InputInfo

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

func NewInputInfo

func NewInputInfo(workingDir string, input string, contentType string, privateKey string, publicKeys []string, vaultKey string) (*InputInfo, error)

func (InputInfo) ContentName

func (in InputInfo) ContentName() string

func (*InputInfo) Decrypt

func (inf *InputInfo) Decrypt(forEditing bool) error

func (*InputInfo) Edit

func (in *InputInfo) Edit() error

func (*InputInfo) Encrypt

func (inf *InputInfo) Encrypt() error

todo json raw file

func (InputInfo) Identities

func (in InputInfo) Identities() []age.Identity

func (InputInfo) IsCue added in v1.0.1

func (in InputInfo) IsCue() bool

func (InputInfo) IsEnv added in v1.0.2

func (in InputInfo) IsEnv() bool

func (InputInfo) IsJson

func (in InputInfo) IsJson() bool

func (InputInfo) IsYaml

func (in InputInfo) IsYaml() bool

func (InputInfo) Recipients

func (in InputInfo) Recipients() []age.Recipient

func (InputInfo) Save

func (in InputInfo) Save(output string) error

func (InputInfo) TmpExt

func (in InputInfo) TmpExt() string

func (InputInfo) Validate

func (in InputInfo) Validate() error

Jump to

Keyboard shortcuts

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