envbundle

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(bindings []envfile.Binding, recipients []string) ([]byte, string, error)

func Rewrap

func Rewrap(ciphertext []byte, identity string, recipients []string) ([]byte, string, error)

Rewrap decrypts an age-encrypted blob with the local identity and re-encrypts it to the given recipient set (HUB-04). It is generic: it operates at the age layer and works for any age-encrypted blob (env or draft), because age has no native revocation — re-encryption to the reduced recipient set is the only way to limit a revoked device's future access. Returns the new ciphertext and its content-addressed age_blob:<sha256> ref.

Types

type Plaintext

type Plaintext struct {
	Version int               `json:"version"`
	Vars    []envfile.Binding `json:"vars"`
}

func Decrypt

func Decrypt(ciphertext []byte, identity string) (Plaintext, error)

Jump to

Keyboard shortcuts

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