encryptor

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxChunkSize          = 1024 * 1024
	MaxEncryptedChunkSize = ((MaxChunkSize + (MaxChunkSize / 10) + 16 + 4 + (4 - 1)) / 4) * (4 + 10)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkProcessor

type ChunkProcessor struct {
	// contains filtered or unexported fields
}

func NewChunkProcessor

func NewChunkProcessor(key []byte) (*ChunkProcessor, error)

func (*ChunkProcessor) ProcessChunk

func (cp *ChunkProcessor) ProcessChunk(chunk []byte) ([]byte, error)

type EncryptJob

type EncryptJob struct {
	// contains filtered or unexported fields
}

type EncryptResult

type EncryptResult struct {
	// contains filtered or unexported fields
}

type FileEncryptor

type FileEncryptor struct {
	// contains filtered or unexported fields
}

func NewFileEncryptor

func NewFileEncryptor(key []byte) (*FileEncryptor, error)

func (*FileEncryptor) Encrypt

func (f *FileEncryptor) Encrypt(r io.Reader, w io.Writer, size int64) error

func (*FileEncryptor) GetNonce

func (f *FileEncryptor) GetNonce() ([]byte, []byte)

Jump to

Keyboard shortcuts

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