storagekey

package
v0.1.0-rc.40 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package storagekey encrypts recoverable secrets stored by control.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyring

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

Keyring holds the current storage key and an optional previous key used only while ciphertext is being re-encrypted.

func New

func New(current, previous string) (*Keyring, error)

func (*Keyring) CurrentID

func (k *Keyring) CurrentID() string

func (*Keyring) Open

func (k *Keyring) Open(keyID, context string, ciphertext []byte) ([]byte, bool, error)

Open decrypts ciphertext and reports whether it used the previous key.

func (*Keyring) PreviousID

func (k *Keyring) PreviousID() string

func (*Keyring) Seal

func (k *Keyring) Seal(context string, plaintext []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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