Documentation
¶
Index ¶
- func Wrap(inner registryattach.AttachmentStore, svc *dataencryption.Service) (registryattach.AttachmentStore, error)
- type EncryptStore
- func (s *EncryptStore) Delete(ctx context.Context, storageKey string) error
- func (s *EncryptStore) GetSignedURL(ctx context.Context, storageKey string, expiry time.Duration) (*url.URL, error)
- func (s *EncryptStore) Retrieve(ctx context.Context, storageKey string) (io.ReadCloser, error)
- func (s *EncryptStore) Store(ctx context.Context, data io.Reader, maxSize int64, contentType string) (*registryattach.FileStoreResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(inner registryattach.AttachmentStore, svc *dataencryption.Service) (registryattach.AttachmentStore, error)
Wrap wraps an AttachmentStore with MSEH-based attachment encryption via svc.
Types ¶
type EncryptStore ¶
type EncryptStore struct {
// contains filtered or unexported fields
}
EncryptStore wraps an AttachmentStore with MSEH encryption on write and MSEH decryption on read.
func (*EncryptStore) Delete ¶
func (s *EncryptStore) Delete(ctx context.Context, storageKey string) error
func (*EncryptStore) GetSignedURL ¶
func (*EncryptStore) Retrieve ¶
func (s *EncryptStore) Retrieve(ctx context.Context, storageKey string) (io.ReadCloser, error)
Retrieve decrypts an MSEH-wrapped attachment.
func (*EncryptStore) Store ¶
func (s *EncryptStore) Store(ctx context.Context, data io.Reader, maxSize int64, contentType string) (*registryattach.FileStoreResult, error)
Store streams plaintext through AES-CTR encryption into the inner store while hashing and enforcing the plaintext max size.
Click to show internal directories.
Click to hide internal directories.