Skip to content

Commit

Permalink
Fix code example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
astrolox committed Jan 30, 2024
1 parent 96d18ca commit 1d52ce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ package main
import "github.com/k42-software/go-altcha"

// Generate a challenge
challenge := altcha.NewChallenge()
challenge := altcha.NewChallengeEncoded()

// Generate a response
response, ok := altcha.SolveChallenge(challenge, altcha.DefaultComplexity)
if !ok {
panic("failed to solve challenge")
}

// Validate the response
// Validate the response (true for replay prevention)
valid := altcha.ValidateResponse(response, true)

if valid {
Expand Down

0 comments on commit 1d52ce8

Please sign in to comment.