chillerlan-QRCode-Common-GF256.html 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. <h4 class="phpdocumentor-sidebar__root-namespace">
  82. <a href="namespaces/output.html" class="">Output</a>
  83. </h4>
  84. </section>
  85. <section class="phpdocumentor-sidebar__category">
  86. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  87. <h4 class="phpdocumentor-sidebar__root-namespace">
  88. <a href="packages/Application.html" class="">Application</a>
  89. </h4>
  90. </section>
  91. <section class="phpdocumentor-sidebar__category">
  92. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  93. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  94. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  96. </section>
  97. <section class="phpdocumentor-sidebar__category">
  98. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  100. </section>
  101. </aside>
  102. <div class="phpdocumentor-column -nine phpdocumentor-content">
  103. <section>
  104. <ul class="phpdocumentor-breadcrumbs">
  105. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  106. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode.html">QRCode</a></li>
  107. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcode-common.html">Common</a></li>
  108. </ul>
  109. <article class="phpdocumentor-element -class">
  110. <h2 class="phpdocumentor-content__title">
  111. GF256
  112. <div class="phpdocumentor-element__package">
  113. in package
  114. <ul class="phpdocumentor-breadcrumbs">
  115. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  116. </ul>
  117. </div>
  118. </h2>
  119. <div class="phpdocumentor-label-line">
  120. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  121. </div>
  122. <aside class="phpdocumentor-element-found-in">
  123. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  124. :
  125. <span class="phpdocumentor-element-found-in__line">29</span>
  126. </aside>
  127. <p class="phpdocumentor-summary">This class contains utility methods for performing mathematical operations over
  128. the Galois Fields. Operations use a given primitive polynomial in calculations.</p>
  129. <section class="phpdocumentor-description"><p>Throughout this package, elements of the GF are represented as an int
  130. for convenience and speed (but at the cost of memory).</p>
  131. </section>
  132. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  133. Tags
  134. <a href="classes/chillerlan-QRCode-Common-GF256.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  135. </h5>
  136. <dl class="phpdocumentor-tag-list">
  137. <dt class="phpdocumentor-tag-list__entry">
  138. <span class="phpdocumentor-tag__name">author</span>
  139. </dt>
  140. <dd class="phpdocumentor-tag-list__definition">
  141. <section class="phpdocumentor-description"><p>Sean Owen</p>
  142. </section>
  143. </dd>
  144. <dt class="phpdocumentor-tag-list__entry">
  145. <span class="phpdocumentor-tag__name">author</span>
  146. </dt>
  147. <dd class="phpdocumentor-tag-list__definition">
  148. <section class="phpdocumentor-description"><p>David Olivier</p>
  149. </section>
  150. </dd>
  151. </dl>
  152. <h3 id="toc">
  153. Table of Contents
  154. <a href="classes/chillerlan-QRCode-Common-GF256.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  155. </h3>
  156. <h4 id="toc-constants">
  157. Constants
  158. <a href="classes/chillerlan-QRCode-Common-GF256.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  159. </h4>
  160. <dl class="phpdocumentor-table-of-contents">
  161. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  162. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_expTable">expTable</a>
  163. <span>
  164. &nbsp;= [1, 2, 4, 8, 16, 32, 64, 128, 29, 58, 116, 232, 205, 135, 19, 38, 76, 152, 45, 90, 180, 117, 234, 201, 143, 3, 6, 12, 24, 48, 96, 192, 157, 39, 78, 156, 37, 74, 148, 53, 106, 212, 181, 119, 238, 193, 159, 35, 70, 140, 5, 10, 20, 40, 80, 160, 93, 186, 105, 210, 185, 111, 222, 161, 95, 190, 97, 194, 153, 47, 94, 188, 101, 202, 137, 15, 30, 60, 120, 240, 253, 231, 211, 187, 107, 214, 177, 127, 254, 225, 223, 163, 91, 182, 113, 226, 217, 175, 67, 134, 17, 34, 68, 136, 13, 26, 52, 104, 208, 189, 103, 206, 129, 31, 62, 124, 248, 237, 199, 147, 59, 118, 236, 197, 151, 51, 102, 204, 133, 23, 46, 92, 184, 109, 218, 169, 79, 158, 33, 66, 132, 21, 42, 84, 168, 77, 154, 41, 82, 164, 85, 170, 73, 146, 57, 114, 228, 213, 183, 115, 230, 209, 191, 99, 198, 145, 63, 126, 252, 229, 215, 179, 123, 246, 241, 255, 227, 219, 171, 75, 150, 49, 98, 196, 149, 55, 110, 220, 165, 87, 174, 65, 130, 25, 50, 100, 200, 141, 7, 14, 28, 56, 112, 224, 221, 167, 83, 166, 81, 162, 89, 178, 121, 242, 249, 239, 195, 155, 43, 86, 172, 69, 138, 9, 18, 36, 72, 144, 61, 122, 244, 245, 247, 243, 251, 235, 203, 139, 11, 22, 44, 88, 176, 125, 250, 233, 207, 131, 27, 54, 108, 216, 173, 71, 142, 1] </span>
  165. </dt>
  166. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  167. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_logTable">logTable</a>
  168. <span>
  169. &nbsp;= [
  170. 0,
  171. // the first value is never returned, index starts at 1
  172. 0,
  173. 1,
  174. 25,
  175. 2,
  176. 50,
  177. 26,
  178. 198,
  179. 3,
  180. 223,
  181. 51,
  182. 238,
  183. 27,
  184. 104,
  185. 199,
  186. 75,
  187. 4,
  188. 100,
  189. 224,
  190. 14,
  191. 52,
  192. 141,
  193. 239,
  194. 129,
  195. 28,
  196. 193,
  197. 105,
  198. 248,
  199. 200,
  200. 8,
  201. 76,
  202. 113,
  203. 5,
  204. 138,
  205. 101,
  206. 47,
  207. 225,
  208. 36,
  209. 15,
  210. 33,
  211. 53,
  212. 147,
  213. 142,
  214. 218,
  215. 240,
  216. 18,
  217. 130,
  218. 69,
  219. 29,
  220. 181,
  221. 194,
  222. 125,
  223. 106,
  224. 39,
  225. 249,
  226. 185,
  227. 201,
  228. 154,
  229. 9,
  230. 120,
  231. 77,
  232. 228,
  233. 114,
  234. 166,
  235. 6,
  236. 191,
  237. 139,
  238. 98,
  239. 102,
  240. 221,
  241. 48,
  242. 253,
  243. 226,
  244. 152,
  245. 37,
  246. 179,
  247. 16,
  248. 145,
  249. 34,
  250. 136,
  251. 54,
  252. 208,
  253. 148,
  254. 206,
  255. 143,
  256. 150,
  257. 219,
  258. 189,
  259. 241,
  260. 210,
  261. 19,
  262. 92,
  263. 131,
  264. 56,
  265. 70,
  266. 64,
  267. 30,
  268. 66,
  269. 182,
  270. 163,
  271. 195,
  272. 72,
  273. 126,
  274. 110,
  275. 107,
  276. 58,
  277. 40,
  278. 84,
  279. 250,
  280. 133,
  281. 186,
  282. 61,
  283. 202,
  284. 94,
  285. 155,
  286. 159,
  287. 10,
  288. 21,
  289. 121,
  290. 43,
  291. 78,
  292. 212,
  293. 229,
  294. 172,
  295. 115,
  296. 243,
  297. 167,
  298. 87,
  299. 7,
  300. 112,
  301. 192,
  302. 247,
  303. 140,
  304. 128,
  305. 99,
  306. 13,
  307. 103,
  308. 74,
  309. 222,
  310. 237,
  311. 49,
  312. 197,
  313. 254,
  314. 24,
  315. 227,
  316. 165,
  317. 153,
  318. 119,
  319. 38,
  320. 184,
  321. 180,
  322. 124,
  323. 17,
  324. 68,
  325. 146,
  326. 217,
  327. 35,
  328. 32,
  329. 137,
  330. 46,
  331. 55,
  332. 63,
  333. 209,
  334. 91,
  335. 149,
  336. 188,
  337. 207,
  338. 205,
  339. 144,
  340. 135,
  341. 151,
  342. 178,
  343. 220,
  344. 252,
  345. 190,
  346. 97,
  347. 242,
  348. 86,
  349. 211,
  350. 171,
  351. 20,
  352. 42,
  353. 93,
  354. 158,
  355. 132,
  356. 60,
  357. 57,
  358. 83,
  359. 71,
  360. 109,
  361. 65,
  362. 162,
  363. 31,
  364. 45,
  365. 67,
  366. 216,
  367. 183,
  368. 123,
  369. 164,
  370. 118,
  371. 196,
  372. 23,
  373. 73,
  374. 236,
  375. 127,
  376. 12,
  377. 111,
  378. 246,
  379. 108,
  380. 161,
  381. 59,
  382. 82,
  383. 41,
  384. 157,
  385. 85,
  386. 170,
  387. 251,
  388. 96,
  389. 134,
  390. 177,
  391. 187,
  392. 204,
  393. 62,
  394. 90,
  395. 203,
  396. 89,
  397. 95,
  398. 176,
  399. 156,
  400. 169,
  401. 160,
  402. 81,
  403. 11,
  404. 245,
  405. 22,
  406. 235,
  407. 122,
  408. 117,
  409. 44,
  410. 215,
  411. 79,
  412. 174,
  413. 213,
  414. 233,
  415. 230,
  416. 231,
  417. 173,
  418. 232,
  419. 116,
  420. 214,
  421. 244,
  422. 234,
  423. 168,
  424. 80,
  425. 88,
  426. 175,
  427. ] </span>
  428. </dt>
  429. <dd>irreducible polynomial whose coefficients are represented by the bits of an int,
  430. where the least-significant bit represents the constant coefficient</dd>
  431. </dl>
  432. <h4 id="toc-methods">
  433. Methods
  434. <a href="classes/chillerlan-QRCode-Common-GF256.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  435. </h4>
  436. <dl class="phpdocumentor-table-of-contents">
  437. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  438. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_addOrSubtract">addOrSubtract()</a>
  439. <span>
  440. &nbsp;: int </span>
  441. </dt>
  442. <dd>Implements both addition and subtraction -- they are the same in GF(size).</dd>
  443. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  444. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_buildMonomial">buildMonomial()</a>
  445. <span>
  446. &nbsp;: <a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a> </span>
  447. </dt>
  448. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  449. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_exp">exp()</a>
  450. <span>
  451. &nbsp;: int </span>
  452. </dt>
  453. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  454. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_inverse">inverse()</a>
  455. <span>
  456. &nbsp;: int </span>
  457. </dt>
  458. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  459. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_log">log()</a>
  460. <span>
  461. &nbsp;: int </span>
  462. </dt>
  463. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  464. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_multiply">multiply()</a>
  465. <span>
  466. &nbsp;: int </span>
  467. </dt>
  468. </dl>
  469. <section class="phpdocumentor-constants">
  470. <h3 class="phpdocumentor-elements__header" id="constants">
  471. Constants
  472. <a href="classes/chillerlan-QRCode-Common-GF256.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  473. </h3>
  474. <article class="phpdocumentor-element -constant -private ">
  475. <h4 class="phpdocumentor-element__name" id="constant_expTable">
  476. expTable
  477. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_expTable" class="headerlink"><i class="fas fa-link"></i></a>
  478. </h4>
  479. <aside class="phpdocumentor-element-found-in">
  480. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  481. :
  482. <span class="phpdocumentor-element-found-in__line">57</span>
  483. </aside>
  484. <code class="phpdocumentor-signature phpdocumentor-code ">
  485. <span class="phpdocumentor-signature__visibility">private</span>
  486. <span class="phpdocumentor-signature__type">mixed</span>
  487. <span class="phpdocumentor-signature__name">expTable</span>
  488. = <span class="phpdocumentor-signature__default-value">[1, 2, 4, 8, 16, 32, 64, 128, 29, 58, 116, 232, 205, 135, 19, 38, 76, 152, 45, 90, 180, 117, 234, 201, 143, 3, 6, 12, 24, 48, 96, 192, 157, 39, 78, 156, 37, 74, 148, 53, 106, 212, 181, 119, 238, 193, 159, 35, 70, 140, 5, 10, 20, 40, 80, 160, 93, 186, 105, 210, 185, 111, 222, 161, 95, 190, 97, 194, 153, 47, 94, 188, 101, 202, 137, 15, 30, 60, 120, 240, 253, 231, 211, 187, 107, 214, 177, 127, 254, 225, 223, 163, 91, 182, 113, 226, 217, 175, 67, 134, 17, 34, 68, 136, 13, 26, 52, 104, 208, 189, 103, 206, 129, 31, 62, 124, 248, 237, 199, 147, 59, 118, 236, 197, 151, 51, 102, 204, 133, 23, 46, 92, 184, 109, 218, 169, 79, 158, 33, 66, 132, 21, 42, 84, 168, 77, 154, 41, 82, 164, 85, 170, 73, 146, 57, 114, 228, 213, 183, 115, 230, 209, 191, 99, 198, 145, 63, 126, 252, 229, 215, 179, 123, 246, 241, 255, 227, 219, 171, 75, 150, 49, 98, 196, 149, 55, 110, 220, 165, 87, 174, 65, 130, 25, 50, 100, 200, 141, 7, 14, 28, 56, 112, 224, 221, 167, 83, 166, 81, 162, 89, 178, 121, 242, 249, 239, 195, 155, 43, 86, 172, 69, 138, 9, 18, 36, 72, 144, 61, 122, 244, 245, 247, 243, 251, 235, 203, 139, 11, 22, 44, 88, 176, 125, 250, 233, 207, 131, 27, 54, 108, 216, 173, 71, 142, 1]</span>
  489. </code>
  490. </article>
  491. <article class="phpdocumentor-element -constant -private ">
  492. <h4 class="phpdocumentor-element__name" id="constant_logTable">
  493. logTable
  494. <a href="classes/chillerlan-QRCode-Common-GF256.html#constant_logTable" class="headerlink"><i class="fas fa-link"></i></a>
  495. </h4>
  496. <aside class="phpdocumentor-element-found-in">
  497. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  498. :
  499. <span class="phpdocumentor-element-found-in__line">37</span>
  500. </aside>
  501. <p class="phpdocumentor-summary">irreducible polynomial whose coefficients are represented by the bits of an int,
  502. where the least-significant bit represents the constant coefficient</p>
  503. <code class="phpdocumentor-signature phpdocumentor-code ">
  504. <span class="phpdocumentor-signature__visibility">private</span>
  505. <span class="phpdocumentor-signature__type">mixed</span>
  506. <span class="phpdocumentor-signature__name">logTable</span>
  507. = <span class="phpdocumentor-signature__default-value">[
  508. 0,
  509. // the first value is never returned, index starts at 1
  510. 0,
  511. 1,
  512. 25,
  513. 2,
  514. 50,
  515. 26,
  516. 198,
  517. 3,
  518. 223,
  519. 51,
  520. 238,
  521. 27,
  522. 104,
  523. 199,
  524. 75,
  525. 4,
  526. 100,
  527. 224,
  528. 14,
  529. 52,
  530. 141,
  531. 239,
  532. 129,
  533. 28,
  534. 193,
  535. 105,
  536. 248,
  537. 200,
  538. 8,
  539. 76,
  540. 113,
  541. 5,
  542. 138,
  543. 101,
  544. 47,
  545. 225,
  546. 36,
  547. 15,
  548. 33,
  549. 53,
  550. 147,
  551. 142,
  552. 218,
  553. 240,
  554. 18,
  555. 130,
  556. 69,
  557. 29,
  558. 181,
  559. 194,
  560. 125,
  561. 106,
  562. 39,
  563. 249,
  564. 185,
  565. 201,
  566. 154,
  567. 9,
  568. 120,
  569. 77,
  570. 228,
  571. 114,
  572. 166,
  573. 6,
  574. 191,
  575. 139,
  576. 98,
  577. 102,
  578. 221,
  579. 48,
  580. 253,
  581. 226,
  582. 152,
  583. 37,
  584. 179,
  585. 16,
  586. 145,
  587. 34,
  588. 136,
  589. 54,
  590. 208,
  591. 148,
  592. 206,
  593. 143,
  594. 150,
  595. 219,
  596. 189,
  597. 241,
  598. 210,
  599. 19,
  600. 92,
  601. 131,
  602. 56,
  603. 70,
  604. 64,
  605. 30,
  606. 66,
  607. 182,
  608. 163,
  609. 195,
  610. 72,
  611. 126,
  612. 110,
  613. 107,
  614. 58,
  615. 40,
  616. 84,
  617. 250,
  618. 133,
  619. 186,
  620. 61,
  621. 202,
  622. 94,
  623. 155,
  624. 159,
  625. 10,
  626. 21,
  627. 121,
  628. 43,
  629. 78,
  630. 212,
  631. 229,
  632. 172,
  633. 115,
  634. 243,
  635. 167,
  636. 87,
  637. 7,
  638. 112,
  639. 192,
  640. 247,
  641. 140,
  642. 128,
  643. 99,
  644. 13,
  645. 103,
  646. 74,
  647. 222,
  648. 237,
  649. 49,
  650. 197,
  651. 254,
  652. 24,
  653. 227,
  654. 165,
  655. 153,
  656. 119,
  657. 38,
  658. 184,
  659. 180,
  660. 124,
  661. 17,
  662. 68,
  663. 146,
  664. 217,
  665. 35,
  666. 32,
  667. 137,
  668. 46,
  669. 55,
  670. 63,
  671. 209,
  672. 91,
  673. 149,
  674. 188,
  675. 207,
  676. 205,
  677. 144,
  678. 135,
  679. 151,
  680. 178,
  681. 220,
  682. 252,
  683. 190,
  684. 97,
  685. 242,
  686. 86,
  687. 211,
  688. 171,
  689. 20,
  690. 42,
  691. 93,
  692. 158,
  693. 132,
  694. 60,
  695. 57,
  696. 83,
  697. 71,
  698. 109,
  699. 65,
  700. 162,
  701. 31,
  702. 45,
  703. 67,
  704. 216,
  705. 183,
  706. 123,
  707. 164,
  708. 118,
  709. 196,
  710. 23,
  711. 73,
  712. 236,
  713. 127,
  714. 12,
  715. 111,
  716. 246,
  717. 108,
  718. 161,
  719. 59,
  720. 82,
  721. 41,
  722. 157,
  723. 85,
  724. 170,
  725. 251,
  726. 96,
  727. 134,
  728. 177,
  729. 187,
  730. 204,
  731. 62,
  732. 90,
  733. 203,
  734. 89,
  735. 95,
  736. 176,
  737. 156,
  738. 169,
  739. 160,
  740. 81,
  741. 11,
  742. 245,
  743. 22,
  744. 235,
  745. 122,
  746. 117,
  747. 44,
  748. 215,
  749. 79,
  750. 174,
  751. 213,
  752. 233,
  753. 230,
  754. 231,
  755. 173,
  756. 232,
  757. 116,
  758. 214,
  759. 244,
  760. 234,
  761. 168,
  762. 80,
  763. 88,
  764. 175,
  765. ]</span>
  766. </code>
  767. </article>
  768. </section>
  769. <section class="phpdocumentor-methods">
  770. <h3 class="phpdocumentor-elements__header" id="methods">
  771. Methods
  772. <a href="classes/chillerlan-QRCode-Common-GF256.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  773. </h3>
  774. <article
  775. class="phpdocumentor-element
  776. -method
  777. -public
  778. -static "
  779. >
  780. <h4 class="phpdocumentor-element__name" id="method_addOrSubtract">
  781. addOrSubtract()
  782. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_addOrSubtract" class="headerlink"><i class="fas fa-link"></i></a>
  783. </h4>
  784. <aside class="phpdocumentor-element-found-in">
  785. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  786. :
  787. <span class="phpdocumentor-element-found-in__line">81</span>
  788. </aside>
  789. <p class="phpdocumentor-summary">Implements both addition and subtraction -- they are the same in GF(size).</p>
  790. <code class="phpdocumentor-code phpdocumentor-signature ">
  791. <span class="phpdocumentor-signature__visibility">public</span>
  792. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">addOrSubtract</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  793. <div class="phpdocumentor-label-line">
  794. </div>
  795. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  796. <dl class="phpdocumentor-argument-list">
  797. <dt class="phpdocumentor-argument-list__entry">
  798. <span class="phpdocumentor-signature__argument__name">$a</span>
  799. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  800. </dt>
  801. <dd class="phpdocumentor-argument-list__definition">
  802. </dd>
  803. <dt class="phpdocumentor-argument-list__entry">
  804. <span class="phpdocumentor-signature__argument__name">$b</span>
  805. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  806. </dt>
  807. <dd class="phpdocumentor-argument-list__definition">
  808. </dd>
  809. </dl>
  810. <section>
  811. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  812. <span class="phpdocumentor-signature__response_type">int</span>
  813. &mdash;
  814. <section class="phpdocumentor-description"><p>sum/difference of a and b</p>
  815. </section>
  816. </section>
  817. </article>
  818. <article
  819. class="phpdocumentor-element
  820. -method
  821. -public
  822. -static "
  823. >
  824. <h4 class="phpdocumentor-element__name" id="method_buildMonomial">
  825. buildMonomial()
  826. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_buildMonomial" class="headerlink"><i class="fas fa-link"></i></a>
  827. </h4>
  828. <aside class="phpdocumentor-element-found-in">
  829. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  830. :
  831. <span class="phpdocumentor-element-found-in__line">89</span>
  832. </aside>
  833. <code class="phpdocumentor-code phpdocumentor-signature ">
  834. <span class="phpdocumentor-signature__visibility">public</span>
  835. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">buildMonomial</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$degree</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$coefficient</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span></code>
  836. <div class="phpdocumentor-label-line">
  837. </div>
  838. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  839. <dl class="phpdocumentor-argument-list">
  840. <dt class="phpdocumentor-argument-list__entry">
  841. <span class="phpdocumentor-signature__argument__name">$degree</span>
  842. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  843. </dt>
  844. <dd class="phpdocumentor-argument-list__definition">
  845. </dd>
  846. <dt class="phpdocumentor-argument-list__entry">
  847. <span class="phpdocumentor-signature__argument__name">$coefficient</span>
  848. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  849. </dt>
  850. <dd class="phpdocumentor-argument-list__definition">
  851. </dd>
  852. </dl>
  853. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  854. Tags
  855. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_buildMonomial#tags" class="headerlink"><i class="fas fa-link"></i></a>
  856. </h5>
  857. <dl class="phpdocumentor-tag-list">
  858. <dt class="phpdocumentor-tag-list__entry">
  859. <span class="phpdocumentor-tag__name">throws</span>
  860. </dt>
  861. <dd class="phpdocumentor-tag-list__definition">
  862. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  863. </dd>
  864. </dl>
  865. <section>
  866. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  867. <span class="phpdocumentor-signature__response_type"><a href="classes/chillerlan-QRCode-Common-GenericGFPoly.html"><abbr title="\chillerlan\QRCode\Common\GenericGFPoly">GenericGFPoly</abbr></a></span>
  868. &mdash;
  869. <section class="phpdocumentor-description"><p>the monomial representing coefficient * x^degree</p>
  870. </section>
  871. </section>
  872. </article>
  873. <article
  874. class="phpdocumentor-element
  875. -method
  876. -public
  877. -static "
  878. >
  879. <h4 class="phpdocumentor-element__name" id="method_exp">
  880. exp()
  881. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_exp" class="headerlink"><i class="fas fa-link"></i></a>
  882. </h4>
  883. <aside class="phpdocumentor-element-found-in">
  884. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  885. :
  886. <span class="phpdocumentor-element-found-in__line">104</span>
  887. </aside>
  888. <code class="phpdocumentor-code phpdocumentor-signature ">
  889. <span class="phpdocumentor-signature__visibility">public</span>
  890. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">exp</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  891. <div class="phpdocumentor-label-line">
  892. </div>
  893. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  894. <dl class="phpdocumentor-argument-list">
  895. <dt class="phpdocumentor-argument-list__entry">
  896. <span class="phpdocumentor-signature__argument__name">$a</span>
  897. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  898. </dt>
  899. <dd class="phpdocumentor-argument-list__definition">
  900. </dd>
  901. </dl>
  902. <section>
  903. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  904. <span class="phpdocumentor-signature__response_type">int</span>
  905. &mdash;
  906. <section class="phpdocumentor-description"><p>2 to the power of $a in GF(size)</p>
  907. </section>
  908. </section>
  909. </article>
  910. <article
  911. class="phpdocumentor-element
  912. -method
  913. -public
  914. -static "
  915. >
  916. <h4 class="phpdocumentor-element__name" id="method_inverse">
  917. inverse()
  918. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_inverse" class="headerlink"><i class="fas fa-link"></i></a>
  919. </h4>
  920. <aside class="phpdocumentor-element-found-in">
  921. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  922. :
  923. <span class="phpdocumentor-element-found-in__line">133</span>
  924. </aside>
  925. <code class="phpdocumentor-code phpdocumentor-signature ">
  926. <span class="phpdocumentor-signature__visibility">public</span>
  927. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">inverse</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  928. <div class="phpdocumentor-label-line">
  929. </div>
  930. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  931. <dl class="phpdocumentor-argument-list">
  932. <dt class="phpdocumentor-argument-list__entry">
  933. <span class="phpdocumentor-signature__argument__name">$a</span>
  934. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  935. </dt>
  936. <dd class="phpdocumentor-argument-list__definition">
  937. </dd>
  938. </dl>
  939. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  940. Tags
  941. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_inverse#tags" class="headerlink"><i class="fas fa-link"></i></a>
  942. </h5>
  943. <dl class="phpdocumentor-tag-list">
  944. <dt class="phpdocumentor-tag-list__entry">
  945. <span class="phpdocumentor-tag__name">throws</span>
  946. </dt>
  947. <dd class="phpdocumentor-tag-list__definition">
  948. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  949. </dd>
  950. </dl>
  951. <section>
  952. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  953. <span class="phpdocumentor-signature__response_type">int</span>
  954. &mdash;
  955. <section class="phpdocumentor-description"><p>multiplicative inverse of a</p>
  956. </section>
  957. </section>
  958. </article>
  959. <article
  960. class="phpdocumentor-element
  961. -method
  962. -public
  963. -static "
  964. >
  965. <h4 class="phpdocumentor-element__name" id="method_log">
  966. log()
  967. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_log" class="headerlink"><i class="fas fa-link"></i></a>
  968. </h4>
  969. <aside class="phpdocumentor-element-found-in">
  970. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  971. :
  972. <span class="phpdocumentor-element-found-in__line">120</span>
  973. </aside>
  974. <code class="phpdocumentor-code phpdocumentor-signature ">
  975. <span class="phpdocumentor-signature__visibility">public</span>
  976. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">log</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  977. <div class="phpdocumentor-label-line">
  978. </div>
  979. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  980. <dl class="phpdocumentor-argument-list">
  981. <dt class="phpdocumentor-argument-list__entry">
  982. <span class="phpdocumentor-signature__argument__name">$a</span>
  983. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  984. </dt>
  985. <dd class="phpdocumentor-argument-list__definition">
  986. </dd>
  987. </dl>
  988. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  989. Tags
  990. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_log#tags" class="headerlink"><i class="fas fa-link"></i></a>
  991. </h5>
  992. <dl class="phpdocumentor-tag-list">
  993. <dt class="phpdocumentor-tag-list__entry">
  994. <span class="phpdocumentor-tag__name">throws</span>
  995. </dt>
  996. <dd class="phpdocumentor-tag-list__definition">
  997. <span class="phpdocumentor-tag-link"><a href="classes/chillerlan-QRCode-QRCodeException.html"><abbr title="\chillerlan\QRCode\QRCodeException">QRCodeException</abbr></a></span>
  998. </dd>
  999. </dl>
  1000. <section>
  1001. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1002. <span class="phpdocumentor-signature__response_type">int</span>
  1003. &mdash;
  1004. <section class="phpdocumentor-description"><p>base 2 log of $a in GF(size)</p>
  1005. </section>
  1006. </section>
  1007. </article>
  1008. <article
  1009. class="phpdocumentor-element
  1010. -method
  1011. -public
  1012. -static "
  1013. >
  1014. <h4 class="phpdocumentor-element__name" id="method_multiply">
  1015. multiply()
  1016. <a href="classes/chillerlan-QRCode-Common-GF256.html#method_multiply" class="headerlink"><i class="fas fa-link"></i></a>
  1017. </h4>
  1018. <aside class="phpdocumentor-element-found-in">
  1019. <abbr class="phpdocumentor-element-found-in__file" title="src/Common/GF256.php"><a href="files/src-common-gf256.html"><abbr title="src/Common/GF256.php">GF256.php</abbr></a></abbr>
  1020. :
  1021. <span class="phpdocumentor-element-found-in__line">145</span>
  1022. </aside>
  1023. <code class="phpdocumentor-code phpdocumentor-signature ">
  1024. <span class="phpdocumentor-signature__visibility">public</span>
  1025. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">multiply</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$a</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$b</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
  1026. <div class="phpdocumentor-label-line">
  1027. </div>
  1028. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  1029. <dl class="phpdocumentor-argument-list">
  1030. <dt class="phpdocumentor-argument-list__entry">
  1031. <span class="phpdocumentor-signature__argument__name">$a</span>
  1032. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1033. </dt>
  1034. <dd class="phpdocumentor-argument-list__definition">
  1035. </dd>
  1036. <dt class="phpdocumentor-argument-list__entry">
  1037. <span class="phpdocumentor-signature__argument__name">$b</span>
  1038. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  1039. </dt>
  1040. <dd class="phpdocumentor-argument-list__definition">
  1041. </dd>
  1042. </dl>
  1043. <section>
  1044. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  1045. <span class="phpdocumentor-signature__response_type">int</span>
  1046. &mdash;
  1047. <section class="phpdocumentor-description"><p>product of a and b in GF(size)</p>
  1048. </section>
  1049. </section>
  1050. </article>
  1051. </section>
  1052. <div class="phpdocumentor-modal" id="source-view">
  1053. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  1054. <div class="phpdocumentor-modal-container">
  1055. <div class="phpdocumentor-modal-content">
  1056. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/src/Common/GF256.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  1057. </div>
  1058. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  1059. </div>
  1060. </div>
  1061. <script type="text/javascript">
  1062. (function () {
  1063. function loadExternalCodeSnippet(el, url, line) {
  1064. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  1065. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  1066. const language = 'php';
  1067. const code = document.createElement('code');
  1068. code.className = 'language-' + language;
  1069. pre.textContent = '';
  1070. pre.setAttribute('data-line', line)
  1071. code.textContent = 'Loading…';
  1072. pre.appendChild(code);
  1073. var xhr = new XMLHttpRequest();
  1074. xhr.open('GET', src, true);
  1075. xhr.onreadystatechange = function () {
  1076. if (xhr.readyState !== 4) {
  1077. return;
  1078. }
  1079. if (xhr.status < 400 && xhr.responseText) {
  1080. code.textContent = xhr.responseText;
  1081. Prism.highlightElement(code);
  1082. return;
  1083. }
  1084. if (xhr.status === 404) {
  1085. code.textContent = '✖ Error: File could not be found';
  1086. return;
  1087. }
  1088. if (xhr.status >= 400) {
  1089. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  1090. return;
  1091. }
  1092. code.textContent = '✖ Error: An unknown error occurred';
  1093. };
  1094. xhr.send(null);
  1095. });
  1096. }
  1097. const modalButtons = document.querySelectorAll("[data-modal]");
  1098. const openedAsLocalFile = window.location.protocol === 'file:';
  1099. if (modalButtons.length > 0 && openedAsLocalFile) {
  1100. console.warn(
  1101. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  1102. 'browsers block XHR requests when a page is opened this way'
  1103. );
  1104. }
  1105. modalButtons.forEach(function (trigger) {
  1106. if (openedAsLocalFile) {
  1107. trigger.setAttribute("hidden", "hidden");
  1108. }
  1109. trigger.addEventListener("click", function (event) {
  1110. event.preventDefault();
  1111. const modal = document.getElementById(trigger.dataset.modal);
  1112. if (!modal) {
  1113. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  1114. return;
  1115. }
  1116. modal.classList.add("phpdocumentor-modal__open");
  1117. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  1118. const exits = modal.querySelectorAll("[data-exit-button]");
  1119. exits.forEach(function (exit) {
  1120. exit.addEventListener("click", function (event) {
  1121. event.preventDefault();
  1122. modal.classList.remove("phpdocumentor-modal__open");
  1123. });
  1124. });
  1125. });
  1126. });
  1127. })();
  1128. </script>
  1129. </article>
  1130. </section>
  1131. <section class="phpdocumentor-on-this-page__sidebar">
  1132. <section class="phpdocumentor-on-this-page__content">
  1133. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  1134. <ul class="phpdocumentor-list -clean">
  1135. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  1136. <li>
  1137. <ul class="phpdocumentor-list -clean">
  1138. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#toc-constants">Constants</a></li>
  1139. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#toc-methods">Methods</a></li>
  1140. </ul>
  1141. </li>
  1142. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  1143. <li>
  1144. <ul class="phpdocumentor-list -clean">
  1145. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#constant_expTable">expTable</a></li>
  1146. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#constant_logTable">logTable</a></li>
  1147. </ul>
  1148. </li>
  1149. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  1150. <li>
  1151. <ul class="phpdocumentor-list -clean">
  1152. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#method_addOrSubtract">addOrSubtract()</a></li>
  1153. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#method_buildMonomial">buildMonomial()</a></li>
  1154. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#method_exp">exp()</a></li>
  1155. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#method_inverse">inverse()</a></li>
  1156. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#method_log">log()</a></li>
  1157. <li><a href="classes/chillerlan-QRCode-Common-GF256.html#method_multiply">multiply()</a></li>
  1158. </ul>
  1159. </li>
  1160. </ul>
  1161. </section>
  1162. </section>
  1163. </div>
  1164. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  1165. <section class="phpdocumentor-search-results__dialog">
  1166. <header class="phpdocumentor-search-results__header">
  1167. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  1168. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  1169. </header>
  1170. <section class="phpdocumentor-search-results__body">
  1171. <ul class="phpdocumentor-search-results__entries"></ul>
  1172. </section>
  1173. </section>
  1174. </section>
  1175. </div>
  1176. <a href="classes/chillerlan-QRCode-Common-GF256.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  1177. </main>
  1178. <script>
  1179. cssVars({});
  1180. </script>
  1181. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  1182. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  1183. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  1184. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  1185. </body>
  1186. </html>