File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ $altcha = new Altcha('secret hmac key');
3939$options = new ChallengeOptions(
4040 maxNumber: 50000, // the maximum random number
4141 expires: (new \DateTimeImmutable())->add(new \DateInterval('PT10S')),
42- ] );
42+ );
4343
4444$challenge = $altcha->createChallenge($options);
4545echo "Challenge created: " . json_encode($challenge) . "\n";
@@ -75,12 +75,12 @@ Creates a new challenge for ALTCHA.
7575
7676``` php
7777$options = new ChallengeOptions(
78- algorithm: ChallengeOptions::DEFAULT_ALGORITHM ,
79- maxNumber: ChallengeOptions ::DEFAULT_MAX_NUMBER,
78+ algorithm: Algorithm::SHA256 ,
79+ maxNumber: BaseChallengeOptions ::DEFAULT_MAX_NUMBER,
8080 expires: (new \DateTimeImmutable())->add(new \DateInterval('PT10S')),
8181 params: ['query_param' => '123'],
82- saltLength: ChallengeOptions::DEFAULT_SALT_LENGTH
83- ] );
82+ saltLength: 12
83+ );
8484```
8585
8686### ` Altcha::verifySolution(array|string $payload, bool $checkExpires): bool `
You can’t perform that action at this time.
0 commit comments