cacheprot

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cacheprot provides utilities for protection of cache entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageProtection

type StorageProtection interface {
	Protect(id string, input gather.Bytes, output *gather.WriteBuffer)
	Verify(id string, input gather.Bytes, output *gather.WriteBuffer) error
	OverheadBytes() int
}

StorageProtection encapsulates protection (HMAC and/or encryption) applied to local cache items.

func AuthenticatedEncryptionProtection

func AuthenticatedEncryptionProtection(key []byte) (StorageProtection, error)

AuthenticatedEncryptionProtection returns StorageProtection that protects cached data using authenticated encryption.

func ChecksumProtection

func ChecksumProtection(key []byte) StorageProtection

ChecksumProtection returns StorageProtection that protects cached data using HMAC checksums without encryption.

func NoProtection

func NoProtection() StorageProtection

NoProtection returns implementation of StorageProtection that offers no protection.

Jump to

Keyboard shortcuts

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