Documentation ¶
Index ¶
- Constants
- func Copy(ctx context.Context, src, dst cadata.Store, 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) cadata.ID
- func MarshalRef(x Ref) []byte
- type DEK
- type KeyFunc
- type Operator
- type Option
- type Ref
- type Store
Constants ¶
View Source
const ( MaxRefBinaryLen = cadata.IDSize + DEKSize Base64Alphabet = cadata.Base64Alphabet )
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.
func MarshalRef ¶
Types ¶
type DEK ¶
func Convergent ¶
Convergent generates a DEK depending only on ptextHash
type KeyFunc ¶
KeyFunc produces a key for a given blob
func SaltedConvergent ¶
SaltedConvergent uses salt to generate convergent keys for each blob.
type Operator ¶
type Operator struct {
// contains filtered or unexported fields
}
func NewOperator ¶
type Ref ¶
func (Ref) MarshalBinary ¶
func (Ref) MarshalText ¶
func (*Ref) UnmarshalBinary ¶
func (*Ref) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.