keyring

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeySource

type KeySource interface {
	ContentsCode() string
	DecryptKey(b []byte) ([]byte, error)
}

type Keyring

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

func New

func New(rd io.ReaderAt, ks KeySource) (*Keyring, error)

func (*Keyring) ContentsCode

func (kr *Keyring) ContentsCode() string

func (*Keyring) MakeReader

func (kr *Keyring) MakeReader(rd io.Reader, key uint32) (io.Reader, error)

func (*Keyring) MasterKey

func (kr *Keyring) MasterKey() []byte

func (*Keyring) Version

func (kr *Keyring) Version() string

type MemoryKeySource

type MemoryKeySource struct {
	Code    string `json:"code"`
	Version string `json:"version"`
	Master  []byte `json:"master"`
}

func (MemoryKeySource) ContentsCode

func (ks MemoryKeySource) ContentsCode() string

func (MemoryKeySource) DecryptKey

func (ks MemoryKeySource) DecryptKey(b []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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