Documentation
¶
Index ¶
- Constants
- func AppendRef(out []byte, x Ref) []byte
- func Copy(ctx context.Context, src stores.RO, dst stores.WO, 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
- type DEK
- type Machine
- type Params
- type Ref
- func (r *Ref) Equals(other *Ref) bool
- 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 = blobcache.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 Machine ¶
type Machine struct {
// contains filtered or unexported fields
}
func NewMachine ¶
type Params ¶ added in v0.4.0
type Params struct {
Salt [32]byte
CacheSize *int
KeyedHashFunc blobcache.KeyedHashFunc
}
func (Params) GetCacheSize ¶ added in v0.5.0
func (Params) GetKeyedHashFunc ¶ added in v0.5.0
func (p Params) GetKeyedHashFunc() blobcache.KeyedHashFunc
type Ref ¶
func (Ref) MarshalBinary ¶
func (Ref) MarshalText ¶
func (*Ref) UnmarshalBinary ¶
func (*Ref) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.