chillerlan-QRCode-Common-GF256.html 47 KB

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