Skip to content

Commit e5fcea2

Browse files
authored
Merge pull request #13 from EvilKarter/typos
Fix Readme
2 parents 97085fa + 67546db commit e5fcea2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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);
4545
echo "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`

0 commit comments

Comments
 (0)