digestcache

package
Version: v0.0.0-...-9243063 Latest Latest
Warning

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

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

Documentation

Overview

Package digestcache handles cipher digest caching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DigestCache

type DigestCache struct {
	Records map[string][]byte
}

DigestCache holds the cache data and logic.

func New

func New() *DigestCache

New creates a *DigestCache struct.

func (*DigestCache) Add

func (dc *DigestCache) Add(hash []byte, text []byte)

Add inserts a record to the cache.

func (*DigestCache) Lookup

func (dc *DigestCache) Lookup(hash []byte) []byte

Lookup finds and returns a record from the cache.

type Interface

type Interface interface {
	Add(hash []byte, text []byte)
	Lookup(hash []byte) []byte
}

Interface defines the public API for DigestCache.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL