Skip to content

Commit

Permalink
Suppress InternalMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Dec 7, 2020
1 parent ddced82 commit 7e78cb8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Blakechain.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public function getSummaryHash(bool $rawBinary = false): string
/* Make a XOR-encrypted copy of the hash state to prevent PHP's
* interned strings from overwriting the hash state and causing
* corruption. */
/** @psalm-suppress InternalMethod */
$len = Util::strlen($this->summaryHashState);
$pattern = \random_bytes($len);
$tmp = $pattern ^ $this->summaryHashState;
Expand Down Expand Up @@ -204,6 +205,7 @@ public function setFirstPrevHash(string $first = ''): self
*/
public function setSummaryHashState(string $hashState): self
{
/** @psalm-suppress InternalMethod */
$len = Util::strlen($hashState);
if ($len !== 384 && $len !== 361) {
throw new \RangeException(
Expand Down

0 comments on commit 7e78cb8

Please sign in to comment.