Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Guard ¶
type Guard struct { Difficulty int // contains filtered or unexported fields }
Guard implements a spam protection mechanism for Cwtch Servers.
func (*Guard) GenerateChallenge ¶
GenerateChallenge returns a channel result packet with a spamguard challenge nonce
func (*Guard) SolveChallenge ¶
SolveChallenge takes in a challenge and a message and returns a solution The solution is a 24 byte nonce which when hashed with the challenge and the message produces a sha256 hash with Difficulty leading 0s
Click to show internal directories.
Click to hide internal directories.