Skip to content

Commit

Permalink
Fixed: increase hash iteration count to 300_000
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Jan 12, 2024
1 parent 1e6834a commit 697c586
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ $message = new Message('Your message text here.', ['+1234567890']);

try {
$messageState = $client->Send($message);
echo "Message sent with ID: " . $messageState->ID();
echo "Message sent with ID: " . $messageState->ID() . PHP_EOL;
} catch (Exception $e) {
echo "Error sending message: " . $e->getMessage();
echo "Error sending message: " . $e->getMessage() . PHP_EOL;
die(1);
}

try {
$messageState = $client->GetState($messageState->ID());
echo "Message state: " . $messageState->State();
echo "Message state: " . $messageState->State() . PHP_EOL;
} catch (Exception $e) {
echo "Error getting message state: " . $e->getMessage();
echo "Error getting message state: " . $e->getMessage() . PHP_EOL;
die(1);
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/Encryptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function generateSecretKeyFromPassphrase(
string $passphrase,
string $salt,
int $keyLength = 32,
int $iterationCount = 10000
int $iterationCount = 300000
): string {
return hash_pbkdf2('sha1', $passphrase, $salt, $iterationCount, $keyLength, true);
}
Expand Down

0 comments on commit 697c586

Please sign in to comment.