bccrypto

package
v0.0.0-...-575026b Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DEK

type DEK [32]byte

func Convergent

func Convergent(ptextHash cadata.ID) DEK

func RandomKey

func RandomKey(cadata.ID) DEK

func (*DEK) IsZero

func (dek *DEK) IsZero() bool

func (DEK) MarshalJSON

func (dek DEK) MarshalJSON() ([]byte, error)

func (*DEK) UnmarshalJSON

func (dek *DEK) UnmarshalJSON(data []byte) error

type KeyFunc

type KeyFunc func(ptextHash cadata.ID) DEK

func SaltedConvergent

func SaltedConvergent(salt *blobcache.CID) KeyFunc

type Ref

type Ref struct {
	CID blobcache.CID
	DEK DEK
}

Ref contains a CID and a DEK.

func (Ref) IsZero

func (r Ref) IsZero() bool

type Worker

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

Worker contains caches and configuration.

func NewWorker

func NewWorker(salt *blobcache.CID) *Worker

func (*Worker) Get

func (w *Worker) Get(ctx context.Context, s cadata.Getter, ref Ref, buf []byte) (int, error)

func (*Worker) GetF

func (w *Worker) GetF(ctx context.Context, s cadata.Getter, ref Ref, fn func([]byte) error) error

func (*Worker) Post

func (w *Worker) Post(ctx context.Context, s cadata.Poster, data []byte) (Ref, error)

Jump to

Keyboard shortcuts

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