Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Suggested min difficulty DifficultyMin int = 10 // Suggested max difficulty DifficultyMax int = 1000000 // Suggested min multiplier MultiplierMin int = 10 // Suggested max multiplier MultiplierMax int = 1000000 )
Variables ¶
This section is empty.
Functions ¶
func NewChallenge ¶
Generate a new challenge and the matching verifier
difficulty affects how much work both the server and the user have to do multiplier indicates the upper bound of how much more work the user has to do compared to the server
Types ¶
type Challenge ¶
type Challenge struct {
Id string `json:"id"`
Query []byte `json:"q"`
Challenge []byte `json:"c"`
Difficulty int `json:"d"`
}
The representation of a challenge to a user's browser
Click to show internal directories.
Click to hide internal directories.