Class: ContentAddressPlugin

module:kadence/contentaddress~ ContentAddressPlugin

Enforces that any KademliaNode~entry stored in the DHT must be content-addressable (keyed by the hash of it's value).

new ContentAddressPlugin(node [, options])

Parameters:
Name Type Argument Description
node AbstractNode
options object <optional>
Properties
Name Type Argument Default Description
keyAlgorithm string <optional>
"rmd160" Algorithm for hashing
valueEncoding string <optional>
"base64" Text encoding of value
Source:

Methods


validate(request, response, next)

Validate the the key matches the hash of the value
Parameters:
Name Type Description
request AbstractNode~request
response AbstractNode~response
next AbstractNode~next
Source: