keyring

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

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

Key is a boxed byte slice where we allocate the underlying memory with memcall

func ReadKeyIntoMemory

func ReadKeyIntoMemory(id int) (*Key, error)

func (*Key) Free

func (k *Key) Free() error

func (*Key) Read

func (k *Key) Read() []byte

type Keyring

type Keyring struct {
	// contains filtered or unexported fields
}
var (
	SessionKeyring *Keyring = &Keyring{ringid: unix.KEY_SPEC_SESSION_KEYRING}
)

func (*Keyring) AddKey

func (k *Keyring) AddKey(name string, b []byte) error

func (*Keyring) CreateKeyring

func (ring *Keyring) CreateKeyring() (*Keyring, error)

func (*Keyring) ReadKey

func (k *Keyring) ReadKey(name string) (*Key, error)

func (*Keyring) RemoveKey

func (k *Keyring) RemoveKey(name string) error

type ThreadKeyring

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

ThreadKeyring runs Keyring in a dedicated OS Thread

func NewThreadKeyring

func NewThreadKeyring(ctx context.Context, keyring *Keyring) (*ThreadKeyring, error)

func (*ThreadKeyring) AddKey

func (tk *ThreadKeyring) AddKey(name string, key []byte) error

func (*ThreadKeyring) ReadKey

func (tk *ThreadKeyring) ReadKey(name string) (*Key, error)

func (*ThreadKeyring) RemoveKey

func (tk *ThreadKeyring) RemoveKey(name string) error

func (*ThreadKeyring) Wait

func (tk *ThreadKeyring) Wait()

Jump to

Keyboard shortcuts

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