kv

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package kv implements a key-value FileVault storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

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

KV is a FileVault storage backend based on a key-value store. Its primary storage duties are initially generating and then subsequently loading the keypair from storage. It uses a single keypair for all FileVault PSK encryption/decryption. The actual PSK storage and retrieval (i.e. once decrypted) is abstracted to another storage interface.

func New

func New(ctx context.Context, b kv.Bucket, p storage.PRKStorage) (*KV, error)

func (*KV) EscrowPRK

func (s *KV) EscrowPRK(ctx context.Context, id string, cms []byte) error

EscrowPRK decrypts the CMS PRK and stores it.

func (*KV) RetrievePRK

func (s *KV) RetrievePRK(ctx context.Context, id string) (string, error)

func (*KV) RetrievePRKCertRaw

func (s *KV) RetrievePRKCertRaw(ctx context.Context, _ string) ([]byte, error)

Jump to

Keyboard shortcuts

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