wp-includes/sodium_compat/src/Core/ChaCha20/Ctx.php:127Initialize (pad) a counter value.
$ctrstringstring public function initCounter( #[SensitiveParameter] $ctr ) { $len = self::strlen($ctr); if ($len === 0) { return str_repeat("\0", 8); } if ($len < 8) { return $ctr . str_repeat("\0", 8 - $len); } if ($len > 8) { throw new SodiumException("counter cannot be more than 8 bytes"); } return $ctr; }Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
src/wp-includes/sodium_compat/src/Core/ChaCha20/Ctx.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.