InMemoryLruCache

class InMemoryLruCache(maxCacheSize: Int) : ChallengeChecker

A ChallengeChecker which checks for replay of challenges via an in-memory LRU cache which holds up to maxCacheSize challenges. Challenges are considered invalid if they are already present in the cache, which prevents replay (reuse of challenges). Checking a challenge will affect the ordering of the cache, making it more-recently-used.

Constructors

Link copied to clipboard
constructor(maxCacheSize: Int)

Functions

Link copied to clipboard
open override fun checkChallenge(challenge: ByteString): Boolean

Checks the given challenge for validity.