replay

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplayCache

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

ReplayCache stores the signature of recent decrypted packets to avoid a replay attack.

func NewCache

func NewCache(capacity int, expireInterval time.Duration) *ReplayCache

NewCache creates a new replay cache.

func (*ReplayCache) IsDuplicate

func (c *ReplayCache) IsDuplicate(data []byte) bool

IsDuplicate checks if the given data is present in the replay cache.

func (*ReplayCache) Sizes

func (c *ReplayCache) Sizes() (int, int)

Sizes returns the number of entries in `current` map and `previous` map.

Jump to

Keyboard shortcuts

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