chillerlan-QRCode-Common-GF256.html 47 KB

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