Changeset 51002 for trunk/src/wp-includes/sodium_compat/src/File.php
- Timestamp:
- 05/25/2021 01:54:12 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sodium_compat/src/File.php
r49741 r51002 598 598 599 599 $hs = hash_init('sha512'); 600 hash_update($hs, self::substr($az, 32, 32));600 self::hash_update($hs, self::substr($az, 32, 32)); 601 601 /** @var resource $hs */ 602 602 $hs = self::updateHashWithFile($hs, $fp, $size); … … 617 617 618 618 $hs = hash_init('sha512'); 619 hash_update($hs, self::substr($sig, 0, 32));620 hash_update($hs, self::substr($pk, 0, 32));619 self::hash_update($hs, self::substr($sig, 0, 32)); 620 self::hash_update($hs, self::substr($pk, 0, 32)); 621 621 /** @var resource $hs */ 622 622 $hs = self::updateHashWithFile($hs, $fp, $size); … … 729 729 730 730 $hs = hash_init('sha512'); 731 hash_update($hs, self::substr($sig, 0, 32));732 hash_update($hs, self::substr($publicKey, 0, 32));731 self::hash_update($hs, self::substr($sig, 0, 32)); 732 self::hash_update($hs, self::substr($publicKey, 0, 32)); 733 733 /** @var resource $hs */ 734 734 $hs = self::updateHashWithFile($hs, $fp, $size); … … 1084 1084 * loading the entire file into memory. 1085 1085 * 1086 * @param resource| object $hash1086 * @param resource|HashContext $hash 1087 1087 * @param resource $fp 1088 1088 * @param int $size … … 1134 1134 /** @var string $message */ 1135 1135 /** @psalm-suppress InvalidArgument */ 1136 hash_update($hash, $message);1136 self::hash_update($hash, $message); 1137 1137 } 1138 1138 // Reset file pointer's position … … 1176 1176 1177 1177 $hs = hash_init('sha512'); 1178 hash_update($hs, self::substr($az, 32, 32));1178 self::hash_update($hs, self::substr($az, 32, 32)); 1179 1179 /** @var resource $hs */ 1180 1180 $hs = self::updateHashWithFile($hs, $fp, $size); … … 1195 1195 1196 1196 $hs = hash_init('sha512'); 1197 hash_update($hs, self::substr($sig, 0, 32));1198 hash_update($hs, self::substr($pk, 0, 32));1197 self::hash_update($hs, self::substr($sig, 0, 32)); 1198 self::hash_update($hs, self::substr($pk, 0, 32)); 1199 1199 /** @var resource $hs */ 1200 1200 $hs = self::updateHashWithFile($hs, $fp, $size); … … 1279 1279 1280 1280 $hs = hash_init('sha512'); 1281 hash_update($hs, self::substr($sig, 0, 32));1282 hash_update($hs, self::substr($publicKey, 0, 32));1281 self::hash_update($hs, self::substr($sig, 0, 32)); 1282 self::hash_update($hs, self::substr($publicKey, 0, 32)); 1283 1283 /** @var resource $hs */ 1284 1284 $hs = self::updateHashWithFile($hs, $fp, $size); … … 1528 1528 $pos = self::ftell($ifp); 1529 1529 1530 /** @var int $iter */1531 $iter = 1;1532 1533 /** @var int $incr */1534 $incr = self::BUFFER_SIZE >> 6;1535 1536 1530 while ($mlen > 0) { 1537 1531 $blockSize = $mlen > self::BUFFER_SIZE … … 1544 1538 $state->update($ciphertext); 1545 1539 $mlen -= $blockSize; 1546 $iter += $incr;1547 1540 } 1548 1541 $res = ParagonIE_Sodium_Core32_Util::verify_16($tag, $state->finish());
Note: See TracChangeset
for help on using the changeset viewer.