replay

package
v0.0.0-...-12269c2 Latest Latest
Warning

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

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

Documentation

Overview

Package replay implements an efficient anti-replay algorithm as specified in RFC 6479.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter added in v0.0.20201118

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

A Filter rejects replayed messages by checking if message counter value is within a sliding window of previously received messages. The zero value for Filter is an empty filter ready to use. Filters are unsafe for concurrent use.

func (*Filter) Reset added in v0.0.20201118

func (f *Filter) Reset()

Reset resets the filter to empty state.

func (*Filter) ValidateCounter added in v0.0.20201118

func (f *Filter) ValidateCounter(counter, limit uint64) bool

ValidateCounter checks if the counter should be accepted. Overlimit counters (>= limit) are always rejected.

Jump to

Keyboard shortcuts

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