security

package
v0.0.0-...-7062c8d Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockManager

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

func NewBlockManager

func NewBlockManager(key []byte) (*BlockManager, error)

func (*BlockManager) CleanupInactiveBlocks

func (bm *BlockManager) CleanupInactiveBlocks(threshold time.Duration)

func (*BlockManager) DecryptBlock

func (bm *BlockManager) DecryptBlock(blockID string) ([]byte, error)

func (*BlockManager) EncryptBlock

func (bm *BlockManager) EncryptBlock(blockID string, data []byte) error

func (*BlockManager) LockBlock

func (bm *BlockManager) LockBlock(blockID string) error

type Encryptor

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

func NewEncryptor

func NewEncryptor(key []byte) (*Encryptor, error)

func (*Encryptor) Decrypt

func (e *Encryptor) Decrypt(data []byte) ([]byte, error)

func (*Encryptor) Encrypt

func (e *Encryptor) Encrypt(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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