$salt, 'verifier' => $verifier, ]; } private static function gmpToLittleEndianBytes(\GMP $value, int $length): string { $bytes = gmp_export($value, 1, GMP_LSW_FIRST | GMP_LITTLE_ENDIAN); if (strlen($bytes) > $length) { throw new RuntimeException('SRP6 verifier přesáhl očekávanou délku.'); } return str_pad($bytes, $length, "\0", STR_PAD_RIGHT); } }