Documentation ¶
Index ¶
- func NewServer(des DeterministicEncryptedStore, gs GrantService, chunkSize int) *grpcService
- func ReceiveCiphertext(srv CiphertextReceiver) ([]byte, error)
- func ReceivePlaintext(srv PlaintextReceiver) ([]byte, []byte, error)
- func ReceivePlaintextAndGrantSpec(srv PlaintextAndGrantSpecReceiver) ([]byte, []byte, *grant.Spec, error)
- func SendCiphertext(srv CiphertextSender, data []byte, cs int) error
- func SendPlaintext(srv PlaintextSender, data, salt []byte, cs int) error
- func SendPlaintextAndGrantSpec(srv PlaintextAndGrantSpecSender, spec *grant.Spec, data, salt []byte, cs int) error
- type CiphertextReceiver
- type CiphertextSender
- type DeterministicEncryptedStore
- type DeterministicEncryptor
- type GrantService
- type Hoard
- func (hrd *Hoard) Decrypt(ref *reference.Ref, encryptedData []byte) ([]byte, error)
- func (hrd *Hoard) Encrypt(data, salt []byte) (*reference.Ref, []byte, error)
- func (hrd *Hoard) Get(ref *reference.Ref) ([]byte, error)
- func (hrd *Hoard) Name() string
- func (hrd *Hoard) Put(data, salt []byte) (*reference.Ref, error)
- func (hrd *Hoard) Seal(ref *reference.Ref, spec *grant.Spec) (*grant.Grant, error)
- func (hrd *Hoard) Store() stores.ContentAddressedStore
- func (hrd *Hoard) Unseal(grt *grant.Grant) (*reference.Ref, error)
- type PlaintextAndGrantSpecReceiver
- type PlaintextAndGrantSpecSender
- type PlaintextReceiver
- type PlaintextSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(des DeterministicEncryptedStore, gs GrantService, chunkSize int) *grpcService
func ReceiveCiphertext ¶ added in v5.1.0
func ReceiveCiphertext(srv CiphertextReceiver) ([]byte, error)
func ReceivePlaintext ¶ added in v5.1.0
func ReceivePlaintext(srv PlaintextReceiver) ([]byte, []byte, error)
func ReceivePlaintextAndGrantSpec ¶ added in v5.1.0
func SendCiphertext ¶ added in v5.1.0
func SendCiphertext(srv CiphertextSender, data []byte, cs int) error
func SendPlaintext ¶ added in v5.1.0
func SendPlaintext(srv PlaintextSender, data, salt []byte, cs int) error
func SendPlaintextAndGrantSpec ¶ added in v5.1.0
Types ¶
type CiphertextReceiver ¶ added in v5.1.0
type CiphertextReceiver interface {
Recv() (*api.Ciphertext, error)
}
type CiphertextSender ¶ added in v5.1.0
type CiphertextSender interface {
Send(*api.Ciphertext) error
}
type DeterministicEncryptedStore ¶
type DeterministicEncryptedStore interface { DeterministicEncryptor // Get encrypted data from underlying storage at address and decrypt it using // secretKey Get(ref *reference.Ref) (data []byte, err error) // Encrypt data and put it in underlying storage Put(data, salt []byte) (*reference.Ref, error) // Get the underlying ContentAddressedStore Store() stores.ContentAddressedStore }
type DeterministicEncryptor ¶
type GrantService ¶
type Hoard ¶
type Hoard struct {
// contains filtered or unexported fields
}
This is our top level API object providing library acting as a deterministic encrypted store and a grant issuer. It can be consumed as a Go library or as a GRPC service through grpcService which just plumbs this object into the hoard.proto interface.
func NewHoard ¶
func NewHoard(store stores.NamedStore, secrets config.SecretsManager, logger log.Logger) *Hoard
func (*Hoard) Store ¶
func (hrd *Hoard) Store() stores.ContentAddressedStore
type PlaintextAndGrantSpecReceiver ¶ added in v5.1.0
type PlaintextAndGrantSpecReceiver interface {
Recv() (*api.PlaintextAndGrantSpec, error)
}
type PlaintextAndGrantSpecSender ¶ added in v5.1.0
type PlaintextAndGrantSpecSender interface {
Send(*api.PlaintextAndGrantSpec) error
}
type PlaintextReceiver ¶ added in v5.1.0
type PlaintextSender ¶ added in v5.1.0
Directories ¶
Path | Synopsis |
---|---|
Contains core types and logic pertaining to Hoard's backend storage services - but not the implementations of those stores to avoid a large number of possibly unwanted dependencies
|
Contains core types and logic pertaining to Hoard's backend storage services - but not the implementations of those stores to avoid a large number of possibly unwanted dependencies |
Click to show internal directories.
Click to hide internal directories.