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.
Click to show internal directories.
Click to hide internal directories.