From 0003fcc4e0dc97fc09c6d3364eaf989aea96b98e Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 10 Jun 2016 18:31:14 -0400 Subject: [PATCH] Add older xtea key dump (not sure how correct this is?) and xtea key manager --- .gitignore | 1 + .../runelite/cache/util/XteaKeyManager.java | 80 ++ cache/src/main/resources/keys.properties | 1102 +++++++++++++++++ .../cache/util/XteaKeyManagerTest.java | 52 + .../net/runelite/cache/util/XteaTest.java | 1 - 5 files changed, 1235 insertions(+), 1 deletion(-) create mode 100644 cache/src/main/java/net/runelite/cache/util/XteaKeyManager.java create mode 100644 cache/src/main/resources/keys.properties create mode 100644 cache/src/test/java/net/runelite/cache/util/XteaKeyManagerTest.java diff --git a/.gitignore b/.gitignore index 847dc2c4d1..4bd4d108e3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ target nbactions.xml nb-configuration.xml /nbproject/ +project.properties diff --git a/cache/src/main/java/net/runelite/cache/util/XteaKeyManager.java b/cache/src/main/java/net/runelite/cache/util/XteaKeyManager.java new file mode 100644 index 0000000000..d54107c361 --- /dev/null +++ b/cache/src/main/java/net/runelite/cache/util/XteaKeyManager.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Adam + * 4. Neither the name of the Adam nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Adam ''AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Adam BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.runelite.cache.util; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.stream.Stream; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class XteaKeyManager +{ + private static final Logger logger = LoggerFactory.getLogger(XteaKeyManager.class); + + private final Map keys = new HashMap<>(); + + public void loadKeys() throws IOException + { + Properties properties = new Properties(); + properties.load(XteaKeyManager.class.getResourceAsStream("/keys.properties")); + + for (Object key : properties.keySet()) + { + int region = Integer.parseInt((String) key); + + String[] values = properties.getProperty((String) key).split(","); + + assert values.length == 4; + + Integer[] k = (Integer[]) Stream.of(values) + .map(i -> Integer.parseInt(i)) + .toArray(Integer[]::new); + + keys.put(region, k); + } + + logger.info("Loaded {} keys", keys.size()); + } + + public int[] getKeys(int region) + { + Integer[] k = keys.get(region); + if (k == null) + return null; + + return Stream.of(k) + .mapToInt(Integer::intValue) + .toArray(); + } +} diff --git a/cache/src/main/resources/keys.properties b/cache/src/main/resources/keys.properties new file mode 100644 index 0000000000..2539820d32 --- /dev/null +++ b/cache/src/main/resources/keys.properties @@ -0,0 +1,1102 @@ +#Fri Jun 10 17:51:46 EDT 2016 +4883=-1864222358,-1285174877,-498143812,-1324275067 +5139=-2076334458,-1586435749,1152711431,690601984 +5140=815115187,-1001257988,-1813200995,1070325845 +5395=547660153,-1046651321,-625363428,-146499406 +5431=0,0,0,0 +5432=0,0,0,0 +5433=0,0,0,0 +5434=0,0,0,0 +5435=0,0,0,0 +5436=0,0,0,0 +5686=-415328952,-1722957765,-1988104258,-1482371828 +5687=-915924717,2044439959,958127992,-1804886116 +5688=918725648,-598186043,752980858,1082964343 +5689=640190104,1955252480,-33490676,-2038254245 +5690=1568989087,-273223858,742924156,-1335311156 +5691=1369815226,-1806339176,-1815964758,-300752676 +5692=-339255036,-1845710010,-1512881427,-681674180 +5942=778477081,-1221729381,1686524208,-1473829520 +5943=-1769242986,-669939742,1489133957,-160074722 +5944=-1117964502,528174709,540476823,1245389715 +5945=-1127544433,-2059659516,1320012334,972822868 +5946=2121339858,-201848668,65025249,-1422288927 +5947=1579898945,-1122263552,-368058862,1676575279 +5948=-426016375,1827158267,-1267754709,144970336 +6197=575541782,-993017173,1314885591,-1648297219 +6198=660902746,-2068096263,-1413743253,-891203104 +6199=1149085766,1371627913,-1646127086,-2109084269 +6200=-1882760462,-2126013438,1737714409,-1411257304 +6201=145432395,213321907,-665312591,-1599828099 +6202=-17610744,-559275587,89112495,184610516 +6203=-2124293250,612181069,-1844514628,-544390488 +6204=1757020559,512516550,-917372608,736620091 +6205=-135374087,-470672330,-378161279,317821183 +6453=-592913504,-1547153623,-1926835571,2004199776 +6454=-7148761,-1476548493,-1064513703,-1309866598 +6455=68461093,307153237,2026658897,-966555531 +6456=1461242047,1613098123,-409979325,-1167515913 +6457=1401850342,-326494223,1402759924,163341694 +6458=-783020103,33569707,-1541426470,802242481 +6459=-1142541459,1108193504,-1313994823,-1508760515 +6460=1030788359,1008170546,-1497939702,-7995445 +6461=1078921785,-409634819,-1569132199,401137920 +6473=992040580,638031835,261782033,-821891305 +6474=0,0,0,0 +6475=0,0,0,0 +6709=1801202510,-1618428991,469498555,1422996091 +6710=276056884,308693826,-89005494,-40161789 +6711=-297250438,-1435199595,-446482106,661916155 +6712=-343401615,-1645536182,1064668944,-1772002652 +6713=-185017549,-527420399,1551803459,10827537 +6714=1738878626,46196516,-1186596019,-1111453612 +6715=1616627342,-2139251063,-151179500,-384927513 +6716=123214777,1026187767,1819791335,864321980 +6717=1331721537,504335860,1440378416,1406799892 +6722=-936169032,1783079905,1040686950,-38287465 +6725=0,0,0,0 +6726=0,0,0,0 +6729=1126052453,-1713274971,1087222694,1490183044 +6731=0,0,0,0 +6965=-1918928955,-1032027183,127895428,519229518 +6966=-564494332,-856240889,-1630858854,-2134369454 +6967=460899845,2006157725,-365961752,1727904013 +6968=-617971607,-645473343,162706703,-654931828 +6969=493228116,1245914431,581680413,-1786017923 +6970=1335215055,1174597954,-1427151738,-1953777881 +6971=936136582,1463341450,-1262679098,-1275147730 +6972=298924854,1532302964,-75867212,-1282877777 +6973=980502839,-1680755347,-178784601,844040430 +6985=1193572731,-1288765743,-386862979,351599890 +6989=1395524951,2044057391,-1782095443,-1569313407 +6991=-1448188175,626198836,1985989165,-1062391664 +6992=0,0,0,0 +6993=487810245,-1442562976,-1813756859,201393142 +6995=1682580054,494401219,2056709286,941384410 +7221=887785797,-217376178,1880652843,630100417 +7222=-1959340931,-1093587963,-470920902,1621260839 +7223=1598112108,-204775269,-1628383019,1712824865 +7224=-1110355776,367334909,-1970710717,-90351039 +7225=1498191186,1346569936,89110696,-799364513 +7226=-303486923,-339473284,386263211,-1896732029 +7227=896534394,1253345675,479312217,1751978530 +7228=9681477,-1498278739,1754154302,-198573261 +7229=-492491245,-1881422324,684523316,610172973 +7234=770491897,153955822,1353583420,883387257 +7236=0,0,0,0 +7238=-853120516,1697831503,-12188711,770411534 +7243=0,0,0,0 +7244=-691574804,2143682949,1384296242,1629392395 +7247=-122734679,-1029771956,1633683499,846700218 +7248=-339349863,-706006976,1444664020,-668854242 +7477=1034372471,2099310509,813631615,-1712341435 +7478=1726457502,177736440,-2130790265,1010875350 +7479=-323390056,-550274915,1609465547,-1523159482 +7480=-1317524207,2134930880,2091049854,-1705168071 +7481=-1736617441,1599050175,1401992097,779714680 +7482=780297945,385463848,-212994814,-634937115 +7483=-1328509011,-5308165,-1115370020,-824879668 +7484=1292599097,-240988029,687846624,777162925 +7490=263913534,-1638392860,113638357,1413881983 +7492=-342030979,1222986839,511788549,910172876 +7494=-462058213,-2060727055,781172327,1942354602 +7496=2094629388,1195529830,-781187094,-1398547511 +7499=-491338351,-1363992450,1635937692,1811095506 +7500=-1760411024,-974003064,-173184067,-188351122 +7501=1108184632,2136992911,-832195021,495111280 +7502=26267951,-656522371,1691464354,-1190303754 +7503=123322402,1328670701,2131431687,-297843970 +7504=208584649,-1280165062,-708222078,-1674764149 +7505=1341812994,-271390749,1403798583,-1228070264 +7507=1513156728,329058734,-976915831,188159865 +7508=-2136974961,1698864039,1345442235,-392395131 +7509=-1652750792,-118212653,738612952,-841624356 +7748=1860227470,-290409954,274550911,-1155783956 +7749=440803793,141606028,974316164,-297919507 +7752=269647857,1404932035,-453318434,-835326556 +7753=1896168736,-1223044138,779149869,-1759332197 +7754=-1233656197,-1121900219,-938322160,264808949 +7755=-1755080873,-1211252399,-292214165,-89648743 +7756=-851417347,306477150,-1843898414,-2141652689 +7757=-33170223,-544803446,824666621,-853642903 +7758=-567703219,-1198223188,-1425625694,-997061155 +7759=-1320000083,2076061305,1835954880,-1810109896 +7760=-801078241,793197910,-981187376,-351008275 +7763=-1343876911,1044681728,896255031,1046614741 +8005=366422637,-1835702272,1878249059,89007049 +8006=0,0,0,0 +8008=786406940,1740168529,269216055,707237245 +8009=-762164025,-14985823,370250788,1782599480 +8010=1232069425,-921145350,-1982873119,-847366196 +8011=-234408500,1004588434,-292397159,-938414258 +8012=748624560,172308470,93086640,62290164 +8013=1568921713,1410894103,1768860982,10014586 +8014=-1279878558,-211098870,431176504,-1619319528 +8015=-1320874262,1937053221,220952674,1903403210 +8017=190133130,1360062109,-744349752,439830170 +8238=0,0,0,0 +8239=1550180499,-836233592,-1760663498,667824821 +8240=2101719552,-225162086,293186389,-162955969 +8241=-320813650,-1654452876,-352291520,-290946896 +8242=0,0,0,0 +8243=0,0,0,0 +8249=0,0,0,0 +8250=0,0,0,0 +8251=1142567601,1650263019,49659607,-899246535 +8252=299772760,1973183321,1248237490,-2068763809 +8253=-963270960,691631833,148151243,-2144254197 +8254=-2072640345,1256455304,497449669,1898688910 +8255=0,0,0,0 +8256=-591763830,-48757057,1738175039,232723115 +8261=-814854830,-517158956,-73164921,-1893566722 +8262=0,0,0,0 +8263=0,0,0,0 +8264=0,0,0,0 +8265=0,0,0,0 +8266=0,0,0,0 +8267=-474856962,-1295973639,789657650,-1769058462 +8269=0,0,0,0 +8270=-1933314063,479199650,-1294184176,658562414 +8278=-242202205,141596885,-28006959,-676164348 +8494=0,0,0,0 +8495=-2002428686,1298958864,902858461,1401847130 +8496=-1664187194,965214818,-242553629,323811582 +8497=2127424498,1622469596,-1889017351,-1927651722 +8498=-1323684593,-1102390619,1456317314,-2027993898 +8499=1158999293,2131770333,-861122128,1149793504 +8505=0,0,0,0 +8506=-1227747958,1491928866,1293676120,2065870654 +8507=1765022148,-80255262,-725852452,-1286377093 +8508=15154596,311598001,1712525714,-2025314533 +8509=-973289301,-969790814,-1028811375,1588532556 +8510=-1808638230,-1458952839,-798099535,1502725514 +8511=0,0,0,0 +8512=0,0,0,0 +8518=0,0,0,0 +8519=-2051430502,-746663069,-593970049,379050420 +8520=576327208,1659610549,-1319545488,-1984379615 +8521=-1909603451,-596972288,-446203583,-1017538492 +8522=0,0,0,0 +8523=2038878456,922187395,-417247631,2130781682 +8524=-1589633890,1373281810,1234902427,1278738071 +8525=1448703859,604202172,1058795271,-80742538 +8526=1902870353,2146539603,1008087450,952553986 +8527=-1775058446,-1254474616,1883141099,1510670223 +8528=984719878,1670396578,415783853,35412288 +8530=443124013,-1494862074,385457104,-722608351 +8534=1712031920,299813553,484205392,-939092911 +8750=0,0,0,0 +8751=-408071913,-1315309970,-1378631121,-1069429918 +8752=1029721719,1987250857,1878989832,1689579435 +8753=-624129783,1782666754,1122426993,741999317 +8754=-1639560654,324451038,1715579908,826622961 +8755=1559444676,788151434,-848316183,1535594545 +8758=-654299252,192885625,1272199999,677612687 +8759=-521997882,-773775727,-1739243295,-1174873201 +8760=975194852,-1765157094,-1333471611,-1820649670 +8761=1760753095,-1427813077,266675077,-255782653 +8762=-1868090282,-1544166661,-731821081,1736861342 +8763=-161594592,-1041269457,871932542,-908444460 +8764=1880374454,1213514336,-2078057600,-2021473694 +8765=1948979312,134066799,-78879371,-323055687 +8766=1244410566,-1397143615,-1848205088,-1435723900 +8767=0,0,0,0 +8768=0,0,0,0 +8774=0,0,0,0 +8775=0,0,0,0 +8776=0,0,0,0 +8777=0,0,0,0 +8778=0,0,0,0 +8779=1287454367,104450986,434236418,1586402984 +8781=-1424107598,264936559,-56759783,-902529771 +8782=524626162,176253155,-1294127808,-1311958442 +9006=-1225975699,-878132401,-1757046335,1009759593 +9007=-1890777568,-82183688,-453894709,1631727865 +9008=-1075666844,-1234078241,2056400103,-911724170 +9009=912583815,463999013,686584702,-1822154518 +9010=1975408960,888933152,-1564560503,1102048305 +9011=1356373374,696555554,-567239079,1543720078 +9012=724638933,2076338436,345020488,-123772998 +9013=-49248474,1484213064,-1990258043,-1725193367 +9014=-1713542063,-1982101350,-301986404,-1927913704 +9015=226408801,-2109385162,1924625593,-854178170 +9016=-826755921,-1467313739,1467444327,-1557591713 +9017=-518439975,-1388520826,203536985,1155539914 +9018=0,0,0,0 +9019=-1293726217,-1696419000,-859948399,1059527576 +9020=-1906040194,849367381,2098246444,1605043698 +9021=-665917952,-432697139,-602494723,-2097936281 +9022=0,0,0,0 +9023=0,0,0,0 +9024=0,0,0,0 +9032=0,0,0,0 +9033=1247884781,12872624,2084188493,1732729074 +9034=385694264,2091635410,1191598764,-2130030706 +9035=89281651,244752360,-501934040,-1984911388 +9038=-1839184278,-512343176,1015456008,1454078167 +9046=1823337636,645784236,428459555,987429760 +9112=-105359935,-926873906,1822554780,894158304 +9262=-1327237404,-257519940,-1398355053,-970581711 +9263=-937938813,1777088166,1291736808,1827292190 +9264=1166653059,1243560308,851316348,-2052894389 +9265=-69315741,857945494,621738712,24039229 +9266=-993699466,-57675946,1882403112,-100529256 +9267=-1258103028,-1254764526,1677604316,440123817 +9268=-1065230305,1961575849,639553674,1441466448 +9269=-951888523,-969454918,-510891980,-2133944603 +9270=1237441751,-550168729,-2090034357,-587507924 +9271=495856485,904420538,906325319,382113326 +9272=-177376709,269714647,573245991,-1662936512 +9273=1804394476,-2052150188,457804873,1513128070 +9274=0,0,0,0 +9275=600751196,2047101363,194553650,-1856484126 +9276=376794062,-234120676,1509008660,1784716874 +9277=272801923,1797149371,-131972865,1265002008 +9278=0,0,0,0 +9279=0,0,0,0 +9280=0,0,0,0 +9285=-1376572370,-121986361,-1862348009,-378224358 +9287=1443932009,-463265503,-1312425655,-729464097 +9288=0,0,0,0 +9289=0,0,0,0 +9290=1405514405,-1134078518,589490923,1931992156 +9293=1689339129,889134383,931806541,-1093266808 +9294=990154613,2143262288,2039829180,-2089104408 +9295=252259816,-1738653065,647037667,-728427630 +9297=31815897,-1803009044,-124553188,1778254213 +9362=-303869826,-245700497,-1669119296,-81225165 +9363=-1863553066,647282340,-1020726787,-957775693 +9364=0,0,0,0 +9365=0,0,0,0 +9366=-807536067,-480096539,25343718,2026800889 +9368=-1118703376,-504248804,-453532612,-335895016 +9369=-1801641608,-1258886171,236355250,2075431926 +9370=-134878738,-405617098,1116582687,1590370274 +9377=-2100807327,-837832930,-1482248847,-2024541092 +9518=-557639005,398566091,-133936467,-850662847 +9519=859829242,1044182946,-1333414478,1254064132 +9520=944915834,-1574960120,-385774437,2039676400 +9521=-637237380,-1067260464,-812999944,-1878124657 +9522=-864860381,1158900271,-573130497,844140856 +9523=602588176,1593273404,-1586670269,-1676867235 +9524=1395326364,-1842418668,-322771315,-1492025058 +9525=-378620600,775905149,1340799858,-383443615 +9526=668895821,1001629706,-990968993,-610942317 +9527=-383152434,1354586129,1751633814,-969382525 +9528=1812708265,-1970932323,-1024439068,1580863646 +9529=0,0,0,0 +9530=0,0,0,0 +9531=208231215,1272236067,1471497122,-1266641877 +9532=-833055699,-1151898924,1553275819,1385329359 +9533=1393307887,646464303,-1582337843,2048412434 +9534=0,0,0,0 +9535=0,0,0,0 +9536=679931979,-1660801436,-1184954844,-1006016912 +9540=9694995,-549217681,-245457589,-2135060519 +9541=251288514,-575473740,1369301674,893365700 +9544=1190108828,-1694672329,922227461,627710655 +9545=1344946793,10967648,1262121795,1712994249 +9546=0,0,0,0 +9547=329512103,102316279,-747448751,-1835390766 +9549=-1176746753,1239859262,1401884004,899484063 +9550=795472733,-1836130665,-1594549016,884470590 +9551=-1626835188,1231268136,1498619093,-435373132 +9552=952883636,1829021129,940359762,-1446331960 +9558=676382323,-760253652,-1846476420,-1225627956 +9618=360102569,-1465352660,-1162135833,-1520883748 +9619=1749228506,400855451,-1397121691,1902692856 +9620=1336106164,-949536016,-577106527,1758809687 +9621=-2022249788,142684799,296632911,-1095098693 +9622=1090796558,-224692446,-711803389,2014164063 +9623=349538282,-1138109777,508128645,-1501868714 +9624=-1463720818,1961887511,-305324613,-277942172 +9625=1509728456,971421072,1160900118,1109378171 +9626=-12871267,-1692742887,-875253553,-209201399 +9631=1720442576,998054937,1875184039,-1320967455 +9632=1745530919,1791422829,-2080762437,1230192059 +9774=-1932459942,1125017578,-167374915,-736167000 +9775=1146604642,1540498392,-441671737,1384808553 +9776=1853173826,-1573689872,-1428243911,-817510808 +9777=1417208604,663554830,2053474821,-503473232 +9778=-57947209,-933225676,-726504293,-2029532036 +9779=-1334564201,735982073,-1674385296,213675526 +9780=-1818481957,1212765102,-2065554530,777209144 +9781=886348431,758745433,73236045,1527594197 +9782=1170761445,-890835820,357446666,993911381 +9783=-631988591,2111327771,253785432,-68428229 +9784=1874487660,1635569708,-1949316626,-1920350613 +9785=-65486938,-1485596203,-1327236566,408455718 +9786=0,0,0,0 +9787=0,0,0,0 +9788=432135203,92254316,-1619550296,76065412 +9789=0,0,0,0 +9790=0,0,0,0 +9791=0,0,0,0 +9792=1500471532,1729075639,-304984137,1117230148 +9796=1527763207,104767880,1427877064,1168739385 +9797=-205296173,319191034,875597650,1295298865 +9799=-1888265788,-1397156572,787793559,-931941367 +9800=1648231074,-690523856,538076864,-489360965 +9801=0,0,0,0 +9802=-1207560898,-2121890421,-1280361853,1268736089 +9803=-276103261,1219048967,1330371093,-1325805898 +9805=883279901,-557028302,292187419,1698553682 +9806=368995667,940146211,957819918,-761335591 +9808=-707225893,982882955,-357647410,1651056801 +9810=0,0,0,0 +9811=0,0,0,0 +9812=-1273078803,1736504359,1000601817,-587299491 +9814=-714482237,-2001297188,1019943041,1077369109 +9874=0,0,0,0 +9875=-266211268,1666415569,-594364895,-521555462 +9876=0,0,0,0 +9877=0,0,0,0 +9878=995266910,958368076,536700735,-1357131199 +9879=-151550133,-1540018745,-1576214369,-1690303359 +9880=-1118773788,1203508402,253575649,-1783228185 +9881=-118522051,-88453867,771259243,7777439 +9882=-119925162,953827533,-1946726509,-409089951 +9883=0,0,0,0 +9886=-1621103539,1580907615,-2010887870,683082929 +10023=0,0,0,0 +10024=0,0,0,0 +10025=0,0,0,0 +10026=0,0,0,0 +10027=1491811841,1724263915,-1397066186,1733646819 +10029=1871723598,1683966302,1882819757,632898970 +10030=-2137454733,-1660899915,763551696,949700536 +10031=-193289939,-1773729763,828608098,706166861 +10032=1485007588,592853707,455119615,1114315243 +10033=-1240165450,-1055643006,-2117555446,149487174 +10034=988286834,2041129832,-2004938358,1165710814 +10035=592486939,-418599077,1578087957,-1778536559 +10036=-1614893142,1631136723,-1286310806,-1380590690 +10037=-1754206741,-119041742,-953673182,-2029343821 +10038=-477492662,-719864233,2055406935,-1658978056 +10039=-1965866179,995512490,222878055,-325973940 +10040=1677876399,-1194279146,-1999655660,-587218459 +10041=1187862613,-117754960,130411769,-1192628982 +10042=736722071,75967325,-775764394,106769937 +10043=1912880022,-1723964516,2062562401,-1162129761 +10044=133920571,-1751184341,-496135747,1322789021 +10045=0,0,0,0 +10046=0,0,0,0 +10047=0,0,0,0 +10048=-1457016886,349941309,-400267403,-1711584223 +10055=983383084,-1215561813,-1609784072,-237182857 +10056=-1720981922,-1853998185,-877496921,-1989396644 +10057=1877754046,-38854828,1524800672,-126925552 +10058=-1500887200,1175576422,-293237688,1320469438 +10059=2024335507,1024306026,1739407852,1514719514 +10061=548011244,-901634624,-101410867,-444090996 +10066=-2129909181,-1005143935,1448560916,869788824 +10067=0,0,0,0 +10070=337024788,-2037667137,-1229192681,72559338 +10071=917431355,-1337694006,-1242762433,-1310804996 +10129=-1008643553,75087295,-877338408,-26439876 +10131=-799460489,46571265,-882380022,-1955140944 +10132=0,0,0,0 +10133=316549370,-1215137663,552543408,1297160714 +10134=1037457150,-489482873,1221101755,1843630400 +10135=0,0,0,0 +10136=1467909566,1489237936,-374908820,-1114049849 +10137=2004154867,1838581386,1070700546,-716969619 +10138=-1266932509,1159824249,1189711903,1903826998 +10139=1486285600,-1247795416,912158038,-386262796 +10140=1336237154,1178256947,107540880,-1425073110 +10142=1872120942,-765842959,449655176,-1168971827 +10144=641721292,1351040532,-1837514900,1449088722 +10279=0,0,0,0 +10280=-1245893544,-118079793,-1624599660,-626968532 +10281=2129832996,-1542613289,-1612399066,-323592936 +10282=667792020,292003472,-998896147,7080342 +10283=-2133080221,1327669620,173304076,-151662318 +10285=1282120748,-1970172786,833113877,-1397625476 +10286=1361188848,-34286611,-2125286769,1026297130 +10287=1974745683,1521308111,1090136695,299424496 +10288=-1471453148,106143546,1933496918,882244130 +10289=-968842141,2088241803,-667581986,-736714935 +10290=-417700430,-1717300185,-682536761,-1790001768 +10291=-1898778356,-69661065,-1732045960,972894477 +10292=1398660527,995064464,-402923403,1856894113 +10293=2048340655,749568533,-178788935,1050472931 +10294=-1496805563,-1772838457,564334215,961646898 +10295=-1920480496,-1423914110,951774544,-1419269290 +10296=1420311343,321724544,-733184290,-1039741548 +10297=-1205119668,-718810521,695794159,834395617 +10298=0,0,0,0 +10299=0,0,0,0 +10300=-615808329,-635901760,981697328,-1782624914 +10301=-158146381,1698585677,-910760378,815929788 +10302=639277786,-1909940120,130074677,491844814 +10303=187236989,-1452229648,1948816476,-1775249280 +10304=697091890,424251437,-890570835,-1490213215 +10307=-808294570,-945302681,-1122362002,76670054 +10309=1450418080,-2118438156,-1409971045,-1573015729 +10310=-1646794225,1193849763,-2140910824,-679653372 +10311=-705203171,591204957,2124610575,-893816837 +10312=0,0,0,0 +10313=0,0,0,0 +10314=709124992,-1272327711,906306935,-2000933182 +10315=-233876849,-1125342091,-1166639407,-591179233 +10317=-1480262506,-731441399,1278300170,1979199008 +10321=-1416786366,-183512307,774862574,1306347169 +10322=-1791860000,1071519955,1129537150,810655061 +10387=-450960717,-984661712,-1100904747,-24533890 +10388=-265259189,-1241885157,436882944,246141352 +10389=770704448,1193341406,1249469353,87539428 +10390=1051817961,-343053224,-754813237,1756784641 +10391=-1489944639,1434936234,-1423076014,-1461880853 +10392=1709101205,-154429803,-671771971,-549997712 +10393=2015658786,385402248,1674435014,813593941 +10394=-842599033,-1314733708,-2136050780,-97257079 +10400=-1656816922,1318311812,-811481661,1625916625 +10535=0,0,0,0 +10536=-293455665,699123022,720513654,1434565986 +10537=-2726506,-559502378,1158305939,1610237688 +10538=0,0,0,0 +10539=0,0,0,0 +10540=-959361815,-301162613,-1942899424,-1273436450 +10541=1436392581,-334805062,1155918987,-305555465 +10542=1860896334,366512684,1403851395,3891367 +10543=0,0,0,0 +10544=1325816466,-256843439,1559662656,-623928454 +10545=-158181993,-1728190565,-1231650312,-58552425 +10546=1455582536,761954897,-1249583795,1609915764 +10547=-307450498,911625416,-266906898,-1495081748 +10548=1055077253,2031662158,712255978,-285388005 +10549=850530822,2099030353,936535377,1438420929 +10550=-1152084028,-1284949135,1531222617,-795574368 +10551=-841014118,-887539436,-361296781,-131626754 +10552=-2088288771,-1992299670,-1820985527,219500542 +10553=948012384,1064486765,-536435505,-1260460939 +10554=1188457126,-1729374406,-799893645,1217674507 +10555=0,0,0,0 +10556=0,0,0,0 +10557=-807815903,958215082,-647601710,1350072419 +10558=320478746,1347785728,-1749447531,1755291725 +10559=1582275931,1926715088,-1674297896,-1578465617 +10560=761635027,-136268132,1896585946,-1863372135 +10566=1904809091,1473116754,-1842695363,-525487276 +10567=17506712,-714133388,1122841819,1045181022 +10568=0,0,0,0 +10569=-1659486452,709083940,385395436,-2031420722 +10570=0,0,0,0 +10571=-588580128,1399078261,378961751,-677661910 +10575=-1679088926,-2074494821,-1858328847,412887807 +10577=0,0,0,0 +10642=681281295,1832158460,-1545558827,457767906 +10644=1901707372,182406419,-1734295784,-1778926327 +10645=-50924045,1634948398,2060598298,443487393 +10646=1341282074,345412696,-2043666158,-457216576 +10647=-518186409,-972158186,-2044393585,-349749786 +10648=-1517859877,-1067995020,-1585215201,-374679401 +10649=505610750,-1378461309,2095868668,888515573 +10650=-1069315244,-2142384241,-2132693353,-9052030 +10652=1474564218,-826457951,312870395,1584424449 +10653=0,0,0,0 +10658=779863296,1161186763,302863173,-1058823374 +10791=0,0,0,0 +10792=-125671574,254943715,1343095705,-1965171670 +10793=0,0,0,0 +10794=409212875,-89674358,812953481,2066661902 +10795=1015757304,1923886377,1425911748,-1352132251 +10796=0,0,0,0 +10797=0,0,0,0 +10798=0,0,0,0 +10799=0,0,0,0 +10800=0,0,0,0 +10801=-1797390300,-1909944987,-2125232241,-1702396364 +10802=-316069634,1806939753,905820853,-1374289179 +10803=985995379,2045532295,-491377836,337633020 +10804=-470118708,-482617436,-1180816772,874167217 +10805=-579022502,-916976570,-1282749556,1841927463 +10806=-718590668,-1770219797,-729235412,-817079926 +10807=75982537,-720362702,-1198847610,1616337264 +10808=385866047,-553044868,130232710,401377614 +10809=-1892727590,270855962,1609680466,-1515726702 +10810=-1248030575,1422712072,-1898499207,-1021336220 +10811=1306442555,-240495984,1066624890,2125895174 +10812=90198727,258723745,748197903,-426406231 +10813=78604466,-1582607088,691011324,-1155733133 +10814=707246869,541333062,-986248348,-171063894 +10815=2102925673,1133406202,-1885710196,165240951 +10816=0,0,0,0 +10821=1941204769,331289852,141366579,-268335570 +10822=-989873116,-1008617403,286517015,-1158556278 +10823=-626951011,-1729338061,-758591782,439072305 +10824=0,0,0,0 +10825=0,0,0,0 +10826=0,0,0,0 +10827=-1272045047,859162189,1413030719,1391630354 +10828=0,0,0,0 +10831=-177320117,-1612987592,-1605203224,-1721326622 +10833=-343079981,-1229174094,464909378,-1717002674 +10834=-1889455567,1500749217,-354834269,100891757 +10835=-1657077082,266274211,-1085762628,-1749143638 +10894=735919102,555758932,2140137384,-236574087 +10895=-1023361029,-570317770,151861206,1877054241 +10899=1459627081,-727895027,-2044964199,-620291618 +10900=-2133835721,755573673,1421700664,-506219491 +10901=-230682502,-1794007651,1780091940,-1470259182 +10902=0,0,0,0 +10903=-504562220,-1788465419,411802708,1581115517 +10904=-737176795,1878328418,-808219307,-2064026484 +10905=-2054596382,-1098390125,-1345404611,-2027138733 +10906=-1953050173,1540292884,1906593781,1417223573 +10907=1703225431,-1175749730,1842579622,-1861290070 +10908=1550571288,-26475264,1005406329,-1715071384 +10910=-1627966663,1961400162,513923592,-1664401531 +10911=1740516481,-686130717,-2082880422,483595095 +11047=0,0,0,0 +11048=0,0,0,0 +11049=0,0,0,0 +11050=-325230911,-2073775590,795252675,-1459867713 +11051=1530933416,466318170,-1331962069,-1132777956 +11052=0,0,0,0 +11053=32444596,502114056,-1429836430,-1663752 +11054=-1320201708,-2086053212,-1247419834,1194434334 +11055=-574895236,-2035462402,-961814299,-1799423977 +11056=70054951,1035991448,1060272040,1496341200 +11057=1082211032,-337177692,-1715867644,1062474445 +11058=1121822822,1368330710,-1324604080,-1938281756 +11059=-1134415175,1829673296,-1057085441,575830343 +11060=624650722,1978191813,106790874,270113843 +11061=1033536593,-1946131728,290528769,63567014 +11062=1346114778,-1599892423,-2087694141,1141153795 +11063=-799637122,634680858,-1779456523,-2034716476 +11064=-2104461903,2010136022,1877631504,-702223329 +11065=-1487802839,856470179,1889283583,1157865105 +11066=-1962220746,1081167688,-1933422777,-954771730 +11067=-707224539,-1928871849,342730307,-854074347 +11068=1956851882,1582504141,-1090835806,1413275925 +11069=281072607,-1791037221,-1221626554,801634958 +11070=1991482486,-631240020,-1616896556,-496223621 +11071=1897069040,1886820064,-149588823,-386960868 +11072=0,0,0,0 +11077=-2132421260,-1211280752,-708556743,-1021345237 +11078=2030809562,1983521609,1452947126,867655603 +11079=1998111305,1542991446,-1380301389,991579859 +11080=0,0,0,0 +11081=1735165447,-115906838,-131987678,51350777 +11082=-1048566284,-1888694855,1387988701,1385807517 +11083=-493686640,-1024195298,-1641548497,-1470647955 +11085=0,0,0,0 +11088=55422364,-1395742606,1155891622,1533530357 +11150=1439826194,-1010340378,1173656988,-225534947 +11151=-1163983296,83965494,-60354985,917491061 +11153=121621896,-621317314,-1580733549,1583574033 +11154=-940562811,-2056474936,208345348,2079919375 +11156=0,0,0,0 +11157=214994736,-1012100824,-441027278,147377986 +11158=0,0,0,0 +11161=0,0,0,0 +11162=0,0,0,0 +11164=1237183727,1713975364,-1748755761,-1239611557 +11165=-1333420503,149104013,-878784817,-1185309247 +11166=431616711,-1774935949,-1016388232,-1018749983 +11167=-1959015492,-1104071,-1016386588,1365103001 +11303=0,0,0,0 +11304=0,0,0,0 +11305=0,0,0,0 +11306=0,0,0,0 +11307=0,0,0,0 +11308=0,0,0,0 +11309=679714158,992251106,521221875,-1463098140 +11310=799091915,912436789,-1101223756,-1073002393 +11311=-1361329479,-1000680093,-2122497452,-843593068 +11312=598732326,-176076610,273893583,-1532513037 +11313=-1770111253,434300350,-1751247941,1190591121 +11314=-745240661,-639290753,-1098766381,203997840 +11315=966999779,-996412609,987484452,778321547 +11316=-35773384,891166204,-764670172,-1312679436 +11317=296971838,108801858,-156676268,1814365908 +11318=-2022319422,1243710410,-196011966,-397695706 +11319=960237862,2060025465,2125950137,-1547545297 +11320=-1608050593,-413428259,2059848881,-2038252682 +11321=-121186753,-2050899182,-1212767079,-1018145454 +11322=1980569972,1133075572,-1076716669,-822410543 +11323=-1788142439,-1669893367,1168059730,-14615580 +11326=1862093150,1696245244,1320714102,1241887579 +11327=0,0,0,0 +11328=0,0,0,0 +11335=-133492081,-915358326,-714649892,-2093709476 +11339=-627990810,-254991828,-600019246,-675527839 +11341=0,0,0,0 +11343=1609908596,-208695388,1245503428,755527086 +11346=-105860665,689539680,738070306,-1603112847 +11347=1950649631,498841255,-654726924,1774022842 +11409=0,0,0,0 +11410=-169561308,-1063099327,-194191190,-1671022339 +11412=-119590785,-577007136,324812522,2041325243 +11413=-559049357,-1994139643,-546891713,-1672807001 +11414=-17229595,121600744,-2020620602,854023833 +11415=-1520538199,-2028340036,133240764,-1858030085 +11416=-1059538966,709623650,-504021228,-999677099 +11417=-825866103,-983981038,1695090457,512428746 +11418=-733079857,1765837884,194282573,-688983255 +11419=1065977435,-509224535,40576513,418190 +11421=1608713237,-1364613120,739493095,1209782580 +11422=292861479,264611299,-36841086,-969923176 +11423=-83687759,1911038334,1324241277,-2119825895 +11559=0,0,0,0 +11560=0,0,0,0 +11561=0,0,0,0 +11562=251950610,213125987,981331915,1778862941 +11563=0,0,0,0 +11564=0,0,0,0 +11565=-864026962,113415575,-379406391,-131310316 +11566=-194037645,857427392,1391206863,1710085980 +11567=-1345473721,-1976740204,-876826485,467288425 +11568=-1469246970,-624547752,-561290398,-647467869 +11569=1717651566,1128020556,731063283,-735957375 +11570=-792361962,-1312397171,-559070480,-384789447 +11571=-662835603,403180723,46115155,-1423747129 +11572=903344163,1788895193,-1065954052,2018480817 +11573=1619053046,-385638423,1316647406,1949601061 +11574=-825432176,-1225435870,-888523969,1469415962 +11575=338355248,-649014765,223161738,1689161507 +11576=-653186907,1743653193,1590707166,841079490 +11577=-46241401,1421680483,-730374940,56253756 +11578=-2077081341,-979705341,1929134052,-1192623985 +11579=-1812176752,-317754254,-1196521232,-764437892 +11580=0,0,0,0 +11581=0,0,0,0 +11582=0,0,0,0 +11583=0,0,0,0 +11584=0,0,0,0 +11587=0,0,0,0 +11588=0,0,0,0 +11589=39678032,469576041,-1878694956,-1720799345 +11590=-1833166913,1319924423,-395085025,1836359724 +11591=487411850,-1758481149,46821158,-1412159339 +11593=-68265860,-1902016861,1905764787,481497713 +11595=-665960015,-301831634,-1835153796,1167428992 +11597=0,0,0,0 +11599=436116620,131552279,1225632398,222110960 +11601=-1893687883,-864936294,1228782843,284464520 +11602=1839380649,399765191,-1191590753,-572127947 +11603=621166473,-911516376,1153516916,-408812618 +11605=-378540558,-107822859,1263496242,2050667629 +11665=349416076,755139699,1091965793,93632265 +11666=1817038969,703623,1066086468,-903075141 +11668=-40425663,-2003629766,1937826716,1470764207 +11670=1028163988,1057263331,1497839020,-1771779697 +11671=416860708,145126254,100097791,149398966 +11672=-591234086,-31045531,1542062988,-3960726 +11673=-623040029,-805328900,1387615227,-87832758 +11674=-1888851422,-88279078,-1224316579,-341541181 +11675=-112451479,-352130750,2132676692,-186010733 +11676=518163501,-1779766975,2118065963,1429574180 +11677=0,0,0,0 +11678=350404025,770298785,1215100269,-965606935 +11679=609690281,128260571,1668364056,2141334547 +11815=0,0,0,0 +11816=0,0,0,0 +11817=740863947,-1459447536,-1272357052,-1730407126 +11818=-2034608097,1147002393,-720701760,-1045127369 +11819=-1632272271,-1134214079,-1204220834,-1633494895 +11820=0,0,0,0 +11821=429369364,-1212066187,-1804836115,-878417008 +11822=-356162701,2110870385,96634800,1811101480 +11823=2130349022,175915338,-1366385792,-991714219 +11824=1454760861,272036622,-1792383375,1111582204 +11825=1552560140,621400632,1998992894,516359053 +11826=537565043,595710393,538087122,-1767962017 +11827=-825162820,-1988766044,-1107174145,-773156889 +11828=-1145784817,2116306477,-2140598973,-1056511941 +11829=1868587343,1615421276,-2022469423,-365942930 +11830=-330289343,-910266445,380143962,216219261 +11831=-1379598535,1487570366,1522011426,-838027044 +11832=-1679647256,1474162799,-1274345114,-636833140 +11833=-1997315302,-690957218,-74755481,1196182923 +11834=-807047382,-1721790290,-685437808,-1336283180 +11835=-1059262715,-1250695236,-1200406985,-1241255053 +11836=1588089156,1771433975,1268916763,-1971161569 +11837=403042144,1263608013,1704683622,-1016605222 +11838=0,0,0,0 +11839=0,0,0,0 +11840=0,0,0,0 +11843=0,0,0,0 +11844=-2129226049,809592963,-2080346649,83698842 +11845=0,0,0,0 +11846=1362079854,-982560005,246122867,1987235087 +11847=1256268050,320697571,2125715160,1414345228 +11850=-889203886,-696084321,-1553248758,1929396194 +11851=9654079,2028627283,-2097681902,1533001364 +11854=0,0,0,0 +11855=0,0,0,0 +11857=-1225499683,-2000595018,-612194825,-2014162349 +11924=1132625310,132067456,-328236024,510687418 +11925=-542735733,1707886413,1718962737,243752830 +11926=1209400267,477877199,80483967,2042551892 +11928=926476326,-742526377,-1211115608,-1389832255 +11929=-594430827,1883360979,1887538964,-7696270 +11930=-1421503612,747303536,-830201730,1289877596 +11934=1060780481,-2046290474,1455440477,-1009402152 +11935=2097752418,1730105368,-1547841799,-1500990281 +11937=-1800117222,594641434,-1534218923,1995377301 +12071=0,0,0,0 +12072=0,0,0,0 +12073=0,0,0,0 +12074=0,0,0,0 +12075=0,0,0,0 +12076=0,0,0,0 +12077=0,0,0,0 +12078=0,0,0,0 +12079=-2094201476,174282827,-512716806,1168716986 +12080=-1275219644,1117212890,-1700052380,1083433768 +12081=-401959580,1341178948,161531442,-333967134 +12082=-73273867,-365190421,-1500081810,-1048269965 +12083=1924565427,-1861513262,1621885972,-1721725088 +12084=124124052,917736704,1145475185,-559737093 +12085=-962101186,1692208493,1055876949,183180976 +12086=2085966776,-2014649016,2041354125,1183651413 +12087=-295731020,-1575280864,-1427786523,2033614117 +12088=1712440357,-118942882,-1633701285,1111370540 +12089=381961192,-1993292807,-897178150,1996502618 +12090=-490704115,1933054836,-598188844,-1196769629 +12091=228916531,-262508219,-202673085,423394150 +12092=1123691875,1572690103,-547382676,-1532148829 +12093=-262488699,257166994,1847120811,-562180343 +12094=0,0,0,0 +12095=0,0,0,0 +12096=0,0,0,0 +12100=2076257681,-1991011558,198811101,-1392797354 +12102=1382118987,1343728768,2112712748,-800477706 +12105=-1504106394,-783956403,-1181587904,769140652 +12106=268659948,-1099784127,-484547248,950058410 +12107=1559790359,-539301879,-662292233,719078954 +12108=-422518229,124432724,-1901044626,1480263026 +12109=-860014424,864206554,-221315836,-1278183951 +12110=533805422,-838124689,1969821655,2031344507 +12111=0,0,0,0 +12113=1668148064,1058673313,-1746348692,847341704 +12115=2146362785,1996258091,-613445101,539756591 +12117=1299941830,-1979326072,-513264030,-2027246839 +12180=-1351764866,-1935425725,1882489875,1174127151 +12181=-2102070869,154806747,-711549351,940496102 +12182=2127416232,1961838103,1958225159,502983817 +12184=-234246210,1165255906,-2128449280,-442994173 +12185=-1325148801,-1454689982,-445038328,-198856281 +12186=0,0,0,0 +12187=0,0,0,0 +12190=1343097478,512986088,831467135,1199713214 +12191=0,0,0,0 +12192=-2075187942,18222294,-1251700587,-60731431 +12193=-2019730957,-2097294773,1757044965,226398622 +12333=0,0,0,0 +12334=0,0,0,0 +12335=437353829,1996799724,1671468525,-157682249 +12336=2063980492,-879723492,-206289519,1350976832 +12337=417955364,-1938081784,1203403204,-324269966 +12338=423342790,1751816818,1904550781,93006216 +12339=-2085977810,-1136632849,1694522144,1275239816 +12340=1724698226,1614717592,-2057673947,701403632 +12341=775720140,-156517594,-324228658,514974388 +12342=-1752179585,-1501496914,2093600531,1186418280 +12343=-1711664456,-1215624250,506564739,1302166376 +12344=1004655261,1112441676,-1346215742,-481727651 +12345=-1123116470,-1886379076,75321832,214948598 +12346=-438309373,1452849904,1117286079,-1974566704 +12347=-202795190,1383135528,-694606070,-2016671866 +12348=1350365393,168237729,866964594,-801428796 +12349=-1953790204,-481765269,-2032676757,1325611153 +12350=0,0,0,0 +12351=0,0,0,0 +12352=0,0,0,0 +12362=-941750624,-1226979370,944034487,899374285 +12363=-1110998058,639095581,-1237167031,-824295762 +12369=-832628753,1107609195,262567666,-1274474550 +12433=1978970596,789968501,-190381172,-1695838020 +12436=2039068384,-849078095,1736495340,633100755 +12437=-158396167,754431189,-780531399,184196347 +12438=1545165254,945298048,244672985,-2058714291 +12439=222909170,-801837539,-1071566469,361203942 +12440=-1261035894,-1563337641,-1046294540,-626073738 +12441=-2026951223,1939685642,717697664,-1680068154 +12442=-1727131773,516119511,414030031,455860099 +12443=1722557150,-1896117082,-116917831,-505874810 +12444=740125846,-616828938,-1105406731,-2137203449 +12447=0,0,0,0 +12448=0,0,0,0 +12589=-1085872155,-994837873,398522758,661628936 +12590=-847852939,659305655,-1213226207,-123937046 +12591=-378414298,2125573150,-1992146489,760704144 +12592=-170418848,356765950,-1696375511,1502901373 +12593=158304985,-608638423,51729196,-841269992 +12594=786361279,1268499968,-1067262193,1879887393 +12595=290613390,1096898118,386705955,-1876318368 +12596=1670921057,868587259,-21543777,-356028659 +12597=-497922480,-484753381,170440089,-1727251401 +12598=630389964,47471342,764703061,2133293208 +12599=-550336185,659264845,412777756,1834471441 +12600=2086237847,-2000241337,787272168,-1342875227 +12601=-360556539,1198026803,-609365963,-1563087824 +12602=-1374394205,1101444980,984998077,-955560241 +12603=-242884132,389606965,1030176686,-1491662862 +12604=807889378,-1578149645,-450979164,797804110 +12605=1155917636,1051453277,1891949594,624254318 +12606=0,0,0,0 +12607=0,0,0,0 +12608=0,0,0,0 +12615=-1874411559,1646649234,315633945,-801595718 +12616=-2056679075,1510079104,-980152217,1729149094 +12619=-1993160457,1070537255,1476127716,1614766232 +12621=-2049442353,54665666,1410799613,-667844187 +12622=217491362,1678503583,137908444,-236585897 +12623=2130695640,714802060,-936489344,-1197009428 +12625=-1609575725,1520117872,234620825,-771253345 +12627=0,0,0,0 +12693=-466653775,258247622,-125978579,1115595767 +12694=393271514,65310502,80514283,-1405919995 +12695=0,0,0,0 +12696=-1242009703,-103703576,321080945,-1423174210 +12697=-1373835914,2056833509,2046948236,-783760739 +12698=-314215629,-1968601661,-213249523,-1823776181 +12699=0,0,0,0 +12700=0,0,0,0 +12843=-1561406023,-1717971558,-1397611697,670522369 +12844=2093476291,-208179048,86110726,-3825057 +12845=-995643604,983676677,-2141100032,-557115297 +12846=-1847768314,1351388473,604695988,-84181505 +12847=866914656,49546884,-199697097,-269899792 +12848=364368947,1409137941,-605967679,-2133551654 +12849=1338246802,725567520,-85102353,893729815 +12850=1125611959,-2047842641,640574923,-482389016 +12851=1406680311,-507373480,1090203651,1150436709 +12852=-1754583666,-1163673204,2002738435,-47105232 +12853=-366706214,1244128123,1467535601,-1685957684 +12854=109165671,-1024262469,257969125,619793126 +12855=-518322031,-925764580,-1619559560,-1705235800 +12856=1000931375,1955454153,-709048414,-1193272070 +12857=-1030333857,-636155398,-1457080980,763783039 +12858=-1226941772,1555504161,-2140768976,-234100376 +12859=685015784,-710079402,1947745925,-1849119256 +12860=123949765,-308239645,1582075722,1575075210 +12861=2005912262,1015210806,1798939307,1422210803 +12862=0,0,0,0 +12863=0,0,0,0 +12864=0,0,0,0 +12944=521118523,730231319,436415778,1539636491 +12945=-252075912,1064683133,-1342028283,522881408 +12946=274549764,-312620244,-1547404955,1312087890 +12947=0,0,0,0 +12948=1629198458,696032791,-1386317415,445054408 +12949=326702492,1230357606,-882955247,773139926 +12950=-760456870,1832340636,1822060273,134366558 +12951=-700278939,1204517853,912770506,985515932 +12952=-1121501363,532783434,1004979687,-184641954 +12953=-881682687,237387999,-624329082,-1298557406 +12954=-1867786273,2052871751,1695033355,-1290915034 +12955=-810142216,-1492986107,359590932,1324069293 +12956=0,0,0,0 +12961=1191759587,-1672694415,-2105520311,-238723033 +13099=504959455,207170860,532804542,-1683025752 +13100=-1130788099,-1997293578,-1364494380,1988396971 +13101=-693724191,-183758717,-2039699004,456129446 +13102=-585304244,-85656032,-1672180123,-889752362 +13103=645888446,1217730809,-785898783,-100561780 +13104=-1549937518,867841456,-2132849039,538029082 +13105=1915041857,-715557992,-1251032257,-950393411 +13106=853711784,241148978,378704137,781770156 +13107=-1235220076,-1734863631,1661386917,-967682427 +13108=-683865258,-1984010405,175091826,-660655823 +13109=-471553111,-1871452285,-701273215,686877787 +13110=-1318264965,888235878,245383628,-647017435 +13111=503457639,254407128,349939380,-1676427955 +13112=530719057,82119221,-1794851543,1475681895 +13113=1398683215,80363829,-672405863,-931442738 +13114=-708453323,-1733548942,1163274760,666476754 +13115=-2099310262,641659103,-1008081522,275669909 +13116=2139694288,-2135147752,1514440519,883736716 +13117=821912544,1546544557,466555405,1227280294 +13118=0,0,0,0 +13119=0,0,0,0 +13120=0,0,0,0 +13129=0,0,0,0 +13130=-511284931,1102148021,840323009,1317129942 +13131=-215774799,1770596688,-1859741414,46428953 +13133=1337164076,483135525,-1077996653,-375429285 +13134=1515814492,-785553591,498191721,1015463480 +13135=-970232000,-460900256,-334876553,990830211 +13199=0,0,0,0 +13200=-2085879380,-1869754924,2108097895,-1712035998 +13202=1533689763,-839942043,1742039702,-688266145 +13203=969873823,1510224666,-971553952,442642382 +13204=0,0,0,0 +13205=0,0,0,0 +13206=304075944,1703907314,-1772968267,-1770836846 +13207=0,0,0,0 +13209=-795447804,1305344381,98581556,2008745861 +13210=-1504547443,1455578463,-1808313124,-45471826 +13356=-1356297753,-1806156824,552012298,-390390832 +13357=-1289609105,-914204420,-1599424203,1633363037 +13358=1161010578,1952653029,1120999810,-288558675 +13359=-1927203173,1901245882,1571492169,-1285242248 +13360=1278122805,572668133,-77453673,-1039834035 +13361=-1624107462,817819435,-1530814059,-564613427 +13362=-1037938149,435828222,434919754,610004394 +13363=-1813681591,-113284445,-677012208,-157095296 +13364=617121203,-650463054,1819874519,-1326643966 +13365=1679508050,1546849207,1959810541,2094193740 +13366=383975232,-1437171889,-1986341128,1974449690 +13367=-1928486991,-1735124301,1800325924,373794956 +13368=-922499048,1143654396,1593518953,1160947087 +13369=-857763581,-71502428,-1316897039,-786191624 +13370=974054389,-1738128511,-1351551088,911818788 +13371=-398274614,1285418048,876964091,-1818498048 +13372=-478682134,-1454385096,-1953280295,-249781617 +13373=-535953605,-1780985013,-688550260,-1188501699 +13374=0,0,0,0 +13375=0,0,0,0 +13376=0,0,0,0 +13385=0,0,0,0 +13386=-1288516377,-213459882,-404115428,962881246 +13387=-1778419186,-619625319,-1697870412,1443100006 +13390=1338701375,-495881204,-239503486,-1240179252 +13391=1960167715,409531303,-1991719263,-1504422023 +13457=-1586178495,-637155535,1815326781,-1366043356 +13460=0,0,0,0 +13461=-126183647,-25151941,868809662,1423445530 +13462=689087792,-1397698092,-527092196,1366875067 +13463=1999526360,918663175,365076657,1219539363 +13464=1227847882,803398610,-5192111,-1691721914 +13465=1413782905,945762410,1785992363,-549156308 +13466=0,0,0,0 +13613=1886456173,-126836959,-1483176573,1004191961 +13614=-41651060,-1162430935,-2088565184,-706984645 +13615=-245927081,1831715226,481114168,891099871 +13616=370457353,616921946,-1170739704,2044130271 +13617=1421616817,-582084095,686687157,1008852633 +13618=1794527456,1327687626,-1530695285,556871510 +13619=1896496942,1066834219,-687168290,283811554 +13620=-1088894688,914387768,-508954763,-550642366 +13621=-202413263,1266302014,1130347026,1408446201 +13622=783539144,2135113358,-1606613216,182474131 +13623=-1411643481,-569684148,420885734,1877628936 +13624=2075882635,144612382,-11140999,1068051873 +13625=-1688194808,-751145145,-64310690,-9400824 +13626=2091552269,-19993197,919014338,-2088295508 +13627=341129543,405594157,-935930552,1362472171 +13628=83847925,-1748584368,-1828230097,915424426 +13629=-1526659316,194744161,-1617203167,1822755797 +13630=-1632016999,-2015192780,-2137722473,477794767 +13631=0,0,0,0 +13632=0,0,0,0 +13641=1512088071,1750629293,-784417847,-524435555 +13642=1125073248,299599651,-412000626,895753495 +13643=-2096152615,293017926,1767515393,1867941 +13644=-1023180244,-468674101,2055315686,-405073895 +13645=1919070819,-1118080488,-1677719937,-442172042 +13646=-398226844,1641611431,2089078341,-612967186 +13647=1458589949,136949769,232245174,993110303 +13717=1728244984,-1229607308,331822884,-1224695171 +13718=529650423,1717830650,-1453062164,-1798528219 +13720=0,0,0,0 +13722=-185793481,-181083215,-47433583,1807105564 +13872=249751864,-1160181005,686529712,457524289 +13873=-1098656620,-1288920207,1465590763,1004731135 +13874=-1234746239,586628563,-299400173,1978233307 +13875=-1975669054,-426174311,1257155590,1124940085 +13876=1480528320,-490646222,-321869819,-1159486684 +13877=-2107850094,225601812,1617911385,-1947270536 +13878=1556504514,1519757241,-943962370,-1716553097 +13879=-489064370,2145976597,-1121899197,1908605309 +13880=-672032867,-104766980,-780173326,-1476119873 +13898=-1138636971,-518243004,578049976,-1914763934 +13899=-1479873331,1928178034,1189580878,-275016490 +13900=97715030,700523656,1698480707,-370250573 +13901=0,0,0,0 +13902=0,0,0,0 +13972=-61822991,1297356371,450010028,-1631837179 +13974=-606147120,1392509835,-1748925993,-2005068147 +13975=0,0,0,0 +13977=-2108994106,-1058877965,-1923376536,-1134529053 +13979=1627273349,-5823611,-260048487,837810861 +14128=1907787432,-241593923,1152767085,-541422403 +14129=2079314312,-89031344,495299597,-2042107512 +14130=-596039289,1373127451,76064475,-883145484 +14131=656679978,480195893,1821776845,1153674427 +14132=1385901079,-1626256839,2140816760,-1871930940 +14133=-1689858574,2063905669,-26787295,1781584456 +14134=1639958639,1353940794,-1890627843,521008172 +14135=1902908334,2101671509,1414227201,-709564664 +14136=-1104533465,1792124817,-1564247177,79706641 +14154=100806762,-88006056,-227973854,1810080530 +14155=1949567503,-836537339,1762053189,1856208690 +14156=2120106119,432621674,134495789,1806538551 +14157=0,0,0,0 +14158=0,0,0,0 +14231=-1755210230,1908175918,668053294,1224961752 +14234=177384151,1635490776,1081175528,-1182057711 +14235=675083239,1821128176,-782716010,-136228053 +14379=0,0,0,0 +14380=0,0,0,0 +14381=-534048527,1614741928,-469012711,1064350100 +14382=-2047578817,357439085,332136595,1757066622 +14383=0,0,0,0 +14384=0,0,0,0 +14385=1364819852,-601080749,-1913163625,1024671742 +14386=-1730596947,85732186,-1776102738,-2096470688 +14387=-327431537,-279720677,1848501675,306634513 +14388=1061380274,-429796323,-221565610,-967547362 +14390=1473825785,302727633,-917572280,-1676618959 +14391=784202706,-178013253,818265382,-556698831 +14392=993603906,-1477196579,593064486,166369140 +14486=801004021,788873243,-1673638404,152435782 +14487=-429855042,-1389840343,-2105225602,168492551 +14635=0,0,0,0 +14636=0,0,0,0 +14637=1954698915,587858534,-1998840957,-860751267 +14638=-1928457369,336240380,2045863264,656460099 +14639=-809752832,-1781045737,72924692,-1647649511 +14640=-95254230,-1094148730,-1768319507,105210786 +14646=-980958926,-662047146,-1292054371,-759181576 +14647=-1335812905,-1092857106,114136653,262093827 +14648=-1757352130,-1996516705,263017190,1647356258 +14679=-1504363537,1091947260,-1918058402,1892514413 +14680=-1402970496,1218008241,-133979096,871452051 +14681=1967574173,-817731256,38584090,1208002574 +14682=5709385,271667514,1732792169,-284339972 +14746=1049480080,-1795796634,-659594913,-692835939 +14747=-855824190,993013922,-682290183,39093659 +14891=-1481978705,1351387379,139803217,1691844424 +14892=989249908,1611912325,-656482965,739987970 +14893=-102394113,1484262111,933695487,-283213546 +14894=-1814115261,-896789532,-1597384307,-1406442699 +14895=-1914690605,265847419,467764365,-216011041 +14896=0,0,0,0 +14902=0,0,0,0 +14903=-1111240831,1790345264,-366658712,-331374702 +14904=-1967472485,-192437954,1186759929,-2078112945 +14935=1013337063,408949892,1536232092,565756227 +14936=-346345895,-1846497252,-929213763,491778013 +14937=-204168755,1016616544,744231619,1425833881 +14938=1605054406,-514058121,-404634121,89896334 +14939=1485705430,-1698331197,873702096,78153320 +14994=-1367510435,442605251,790621802,-153396904 +14995=-959943030,1253309690,-1498751036,-63207782 +15147=-423978185,359589519,280220972,-1608470374 +15148=-252789430,44437468,1704562737,627651144 +15149=-1200628316,15132614,-465260385,-1525542932 +15150=-194580988,-1604219208,-1521466446,1493778984 +15151=369069373,-1357409985,445063553,1371311703 +15152=608495786,-1850745649,1481459068,44047411 +15158=-974248920,-1426940984,-551894435,1783499939 +15159=-1801258916,-1714451879,-49882724,401697258 +15160=-553466395,-1372948696,-1385390322,710626387 +15191=292423504,-874682599,1197621808,1199629349 +15192=-529048870,637696288,1453462789,1709373970 +15193=211289309,-353750046,139753703,-1451504415 +15248=1782437015,-236676405,841674749,-2027316999 +15251=-1486248652,-1276586057,-1919527356,-681613618 +15403=858832565,1542433274,-759104113,425400841 +15404=1359247125,-1375693391,-1964404624,-1289877028 +15405=1745315296,704015968,-1726703759,250744336 +15406=900232781,1037303290,2099698517,-1839409134 +15407=-1139819812,165771634,462281145,-1626973480 +15408=1024233955,-1429048064,1595885074,-1194249874 +15414=918566284,-159243781,471949969,-1198041007 +15415=-1274724478,1165018389,2048231360,2009587731 +15416=-1802759876,1171188898,1330028340,1790091100 diff --git a/cache/src/test/java/net/runelite/cache/util/XteaKeyManagerTest.java b/cache/src/test/java/net/runelite/cache/util/XteaKeyManagerTest.java new file mode 100644 index 0000000000..44cd45a65f --- /dev/null +++ b/cache/src/test/java/net/runelite/cache/util/XteaKeyManagerTest.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2016, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Adam + * 4. Neither the name of the Adam nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Adam ''AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL Adam BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.cache.util; + +import java.io.IOException; +import org.junit.Assert; +import org.junit.Test; + +public class XteaKeyManagerTest +{ + @Test + public void test() throws IOException + { + XteaKeyManager xt = new XteaKeyManager(); + xt.loadKeys(); + + int[] keys = xt.getKeys(4883); + int[] expected = new int[] + { + -1864222358, -1285174877, -498143812, -1324275067 + }; + + Assert.assertArrayEquals(expected, keys); + } +} diff --git a/cache/src/test/java/net/runelite/cache/util/XteaTest.java b/cache/src/test/java/net/runelite/cache/util/XteaTest.java index 8c6c0a5e33..b080761d9d 100644 --- a/cache/src/test/java/net/runelite/cache/util/XteaTest.java +++ b/cache/src/test/java/net/runelite/cache/util/XteaTest.java @@ -29,7 +29,6 @@ */ package net.runelite.cache.util; -import net.runelite.cache.util.Xtea; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.util.Random;