encrypt

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

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 (s *EncryptStore) GetSignedURL(ctx context.Context, storageKey string, expiry time.Duration) (*url.URL, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL