Documentation
¶
Index ¶
- Constants
- func AppendRef(out []byte, x Ref) []byte
- func Copy(ctx context.Context, src stores.Reading, dst stores.Writing, ref *Ref) error
- func DeriveKey(out []byte, secret *[32]byte, additional []byte)
- func DeriveStream(secret *[32]byte, additional []byte) io.Reader
- func Equal(a, b Ref) bool
- func Hash(x []byte) blobcache.CID
- type DEK
- type KeyFunc
- type Machine
- type Option
- type Ref
- func (r Ref) IsZero() bool
- func (r *Ref) Marshal() []byte
- func (r Ref) MarshalBinary() ([]byte, error)
- func (r Ref) MarshalText() ([]byte, error)
- func (r Ref) String() string
- func (r *Ref) Unmarshal(data []byte) error
- func (ref *Ref) UnmarshalBinary(x []byte) error
- func (r *Ref) UnmarshalText(data []byte) error
Constants ¶
View Source
const ( Base64Alphabet = cadata.Base64Alphabet RefSize = blobcache.CIDSize + DEKSize )
View Source
const DEKSize = 32
Variables ¶
This section is empty.
Functions ¶
func DeriveKey ¶
DeriveKey uses the blake2b XOF to fill out. The input to the XOF is additional and secret is used to key the XOF.
func DeriveStream ¶
DeriveStream returns a cryptographically secure psuedorandom stream derived from a high entropy secret, and arbitrary additional bytes.
Types ¶
type DEK ¶
func Convergent ¶
Convergent generates a DEK depending only on ptextHash
func (DEK) MarshalText ¶
func (*DEK) UnmarshalText ¶
type KeyFunc ¶
KeyFunc produces a key for a given blob
func SaltedConvergent ¶
SaltedConvergent uses salt to generate convergent keys for each blob.
type Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
func NewMachine ¶
type Ref ¶
func (Ref) MarshalBinary ¶
func (Ref) MarshalText ¶
func (*Ref) UnmarshalBinary ¶
func (*Ref) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.