Back to index

lightning-sunbird  0.9+nobinonly
base64t.c
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is the Netscape Portable Runtime (NSPR).
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998-2000
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "plbase64.h"
00039 #include "plstr.h"
00040 #include "nspr.h"
00041 
00042 #include <stdio.h>
00043 
00044 static unsigned char *base = (unsigned char *)"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00045 
00046 /* PL_Base64Encode, single characters */
00047 PRBool test_001(void)
00048 {
00049     PRUint32 a, b;
00050     unsigned char plain[ 4 ];
00051     unsigned char cypher[ 5 ];
00052     char result[ 8 ];
00053     char *rv;
00054 
00055     printf("Test 001 (PL_Base64Encode, single characters)                         ..."); fflush(stdout);
00056 
00057     plain[1] = plain[2] = plain[3] = (unsigned char)0;
00058     cypher[2] = cypher[3] = (unsigned char)'=';
00059     cypher[4] = (unsigned char)0;
00060 
00061     for( a = 0; a < 64; a++ )
00062     {
00063         cypher[0] = base[a];
00064 
00065         for( b = 0; b < 4; b++ )
00066         {
00067             plain[0] = (unsigned char)(a * 4 + b);
00068             cypher[1] = base[(b * 16)];
00069 
00070             rv = PL_Base64Encode((char *)plain, 1, result);
00071             if( rv != result )
00072             {
00073                 printf("FAIL\n\t(%d, %d): return value\n", a, b);
00074                 return PR_FALSE;
00075             }
00076 
00077             if( 0 != PL_strncmp((char *)cypher, result, 4) )
00078             {
00079                 printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%.4s.\"\n",
00080                        a, b, cypher, result);
00081                 return PR_FALSE;
00082             }
00083         }
00084     }
00085 
00086     printf("PASS\n");
00087     return PR_TRUE;
00088 }
00089 
00090 /* PL_Base64Encode, double characters */
00091 PRBool test_002(void)
00092 {
00093     PRUint32 a, b, c, d;
00094     unsigned char plain[ 4 ];
00095     unsigned char cypher[ 5 ];
00096     char result[ 8 ];
00097     char *rv;
00098 
00099     printf("Test 002 (PL_Base64Encode, double characters)                         ..."); fflush(stdout);
00100 
00101     plain[2] = plain[3] = (unsigned char)0;
00102     cypher[3] = (unsigned char)'=';
00103     cypher[4] = (unsigned char)0;
00104 
00105     for( a = 0; a < 64; a++ )
00106     {
00107         cypher[0] = base[a];
00108         for( b = 0; b < 4; b++ )
00109         {
00110             plain[0] = (a*4) + b;
00111             for( c = 0; c < 16; c++ )
00112             {
00113                 cypher[1] = base[b*16 + c];
00114                 for( d = 0; d < 16; d++ )
00115                 {
00116                     plain[1] = c*16 + d;
00117                     cypher[2] = base[d*4];
00118 
00119                     rv = PL_Base64Encode((char *)plain, 2, result);
00120                     if( rv != result )
00121                     {
00122                         printf("FAIL\n\t(%d, %d, %d, %d): return value\n", a, b, c, d);
00123                         return PR_FALSE;
00124                     }
00125 
00126                     if( 0 != PL_strncmp((char *)cypher, result, 4) )
00127                     {
00128                         printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%.4s.\"\n",
00129                                a, b, c, d, cypher, result);
00130                         return PR_FALSE;
00131                     }
00132                 }
00133             }
00134         }
00135     }
00136 
00137     printf("PASS\n");
00138     return PR_TRUE;
00139 }
00140 
00141 /* PL_Base64Encode, triple characters */
00142 PRBool test_003(void)
00143 {
00144     PRUint32 a, b, c, d, e, f;
00145     unsigned char plain[ 4 ];
00146     unsigned char cypher[ 5 ];
00147     char result[ 8 ];
00148     char *rv;
00149 
00150     printf("Test 003 (PL_Base64Encode, triple characters)                         ..."); fflush(stdout);
00151 
00152     cypher[4] = (unsigned char)0;
00153 
00154     for( a = 0; a < 64; a++ )
00155     {
00156         cypher[0] = base[a];
00157         for( b = 0; b < 4; b++ )
00158         {
00159             plain[0] = (a*4) + b;
00160             for( c = 0; c < 16; c++ )
00161             {
00162                 cypher[1] = base[b*16 + c];
00163                 for( d = 0; d < 16; d++ )
00164                 {
00165                     plain[1] = c*16 + d;
00166                     for( e = 0; e < 4; e++ )
00167                     {
00168                         cypher[2] = base[d*4 + e];
00169                         for( f = 0; f < 64; f++ )
00170                         {
00171                             plain[2] = e * 64 + f;
00172                             cypher[3] = base[f];
00173 
00174                             rv = PL_Base64Encode((char *)plain, 3, result);
00175                             if( rv != result )
00176                             {
00177                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): return value\n", a, b, c, d, e, f);
00178                                 return PR_FALSE;
00179                             }
00180 
00181                             if( 0 != PL_strncmp((char *)cypher, result, 4) )
00182                             {
00183                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.4s.\"\n",
00184                                        a, b, c, d, e, f, cypher, result);
00185                                 return PR_FALSE;
00186                             }
00187                         }
00188                     }
00189                 }
00190             }
00191         }
00192     }
00193 
00194     printf("PASS\n");
00195     return PR_TRUE;
00196 }
00197 
00198     static struct
00199     {
00200         const char *plaintext;
00201         const char *cyphertext;
00202     } array[] =
00203       {
00204           /* Cyphertexts generated with uuenview 0.5.13 */
00205           { " ", "IA==" },
00206           { ".", "Lg==" },
00207           { "/", "Lw==" },
00208           { "C", "Qw==" },
00209           { "H", "SA==" },
00210           { "S", "Uw==" },
00211           { "^", "Xg==" },
00212           { "a", "YQ==" },
00213           { "o", "bw==" },
00214           { "t", "dA==" },
00215 
00216           { "AB", "QUI=" },
00217           { "AH", "QUg=" },
00218           { "AQ", "QVE=" },
00219           { "BD", "QkQ=" },
00220           { "CR", "Q1I=" },
00221           { "CS", "Q1M=" },
00222           { "DB", "REI=" },
00223           { "DC", "REM=" },
00224           { "EK", "RUs=" },
00225           { "ET", "RVQ=" },
00226           { "IM", "SU0=" },
00227           { "JR", "SlI=" },
00228           { "LO", "TE8=" },
00229           { "LW", "TFc=" },
00230           { "ML", "TUw=" },
00231           { "SB", "U0I=" },
00232           { "TO", "VE8=" },
00233           { "VS", "VlM=" },
00234           { "WP", "V1A=" },
00235           /* legitimate two-letter words */
00236           { "ad", "YWQ=" },
00237           { "ah", "YWg=" },
00238           { "am", "YW0=" },
00239           { "an", "YW4=" },
00240           { "as", "YXM=" },
00241           { "at", "YXQ=" },
00242           { "ax", "YXg=" },
00243           { "be", "YmU=" },
00244           { "by", "Ynk=" },
00245           { "do", "ZG8=" },
00246           { "go", "Z28=" },
00247           { "he", "aGU=" },
00248           { "hi", "aGk=" },
00249           { "if", "aWY=" },
00250           { "in", "aW4=" },
00251           { "is", "aXM=" },
00252           { "it", "aXQ=" },
00253           { "me", "bWU=" },
00254           { "my", "bXk=" },
00255           { "no", "bm8=" },
00256           { "of", "b2Y=" },
00257           { "on", "b24=" },
00258           { "or", "b3I=" },
00259           { "ox", "b3g=" },
00260           { "so", "c28=" },
00261           { "to", "dG8=" },
00262           { "up", "dXA=" },
00263           { "us", "dXM=" },
00264           { "we", "d2U=" },
00265           /* all three-letter entries in /usr/dict/words */
00266           { "1st", "MXN0" },
00267           { "2nd", "Mm5k" },
00268           { "3rd", "M3Jk" },
00269           { "4th", "NHRo" },
00270           { "5th", "NXRo" },
00271           { "6th", "NnRo" },
00272           { "7th", "N3Ro" },
00273           { "8th", "OHRo" },
00274           { "9th", "OXRo" },
00275           { "AAA", "QUFB" },
00276           { "AAU", "QUFV" },
00277           { "ABA", "QUJB" },
00278           { "abc", "YWJj" },
00279           { "Abe", "QWJl" },
00280           { "Abo", "QWJv" },
00281           { "ace", "YWNl" },
00282           { "ACM", "QUNN" },
00283           { "ACS", "QUNT" },
00284           { "act", "YWN0" },
00285           { "Ada", "QWRh" },
00286           { "add", "YWRk" },
00287           { "ado", "YWRv" },
00288           { "aft", "YWZ0" },
00289           { "age", "YWdl" },
00290           { "ago", "YWdv" },
00291           { "aid", "YWlk" },
00292           { "ail", "YWls" },
00293           { "aim", "YWlt" },
00294           { "air", "YWly" },
00295           { "ala", "YWxh" },
00296           { "alb", "YWxi" },
00297           { "ale", "YWxl" },
00298           { "Ali", "QWxp" },
00299           { "all", "YWxs" },
00300           { "alp", "YWxw" },
00301           { "A&M", "QSZN" },
00302           { "AMA", "QU1B" },
00303           { "ami", "YW1p" },
00304           { "amp", "YW1w" },
00305           { "Amy", "QW15" },
00306           { "amy", "YW15" },
00307           { "ana", "YW5h" },
00308           { "and", "YW5k" },
00309           { "ani", "YW5p" },
00310           { "Ann", "QW5u" },
00311           { "ant", "YW50" },
00312           { "any", "YW55" },
00313           { "A&P", "QSZQ" },
00314           { "ape", "YXBl" },
00315           { "Apr", "QXBy" },
00316           { "APS", "QVBT" },
00317           { "apt", "YXB0" },
00318           { "arc", "YXJj" },
00319           { "are", "YXJl" },
00320           { "ark", "YXJr" },
00321           { "arm", "YXJt" },
00322           { "art", "YXJ0" },
00323           { "a's", "YSdz" },
00324           { "ash", "YXNo" },
00325           { "ask", "YXNr" },
00326           { "ass", "YXNz" },
00327           { "ate", "YXRl" },
00328           { "Aug", "QXVn" },
00329           { "auk", "YXVr" },
00330           { "Ave", "QXZl" },
00331           { "awe", "YXdl" },
00332           { "awl", "YXds" },
00333           { "awn", "YXdu" },
00334           { "axe", "YXhl" },
00335           { "aye", "YXll" },
00336           { "bad", "YmFk" },
00337           { "bag", "YmFn" },
00338           { "bah", "YmFo" },
00339           { "bam", "YmFt" },
00340           { "ban", "YmFu" },
00341           { "bar", "YmFy" },
00342           { "bat", "YmF0" },
00343           { "bay", "YmF5" },
00344           { "bed", "YmVk" },
00345           { "bee", "YmVl" },
00346           { "beg", "YmVn" },
00347           { "bel", "YmVs" },
00348           { "Ben", "QmVu" },
00349           { "bet", "YmV0" },
00350           { "bey", "YmV5" },
00351           { "bib", "Ymli" },
00352           { "bid", "Ymlk" },
00353           { "big", "Ymln" },
00354           { "bin", "Ymlu" },
00355           { "bit", "Yml0" },
00356           { "biz", "Yml6" },
00357           { "BMW", "Qk1X" },
00358           { "boa", "Ym9h" },
00359           { "bob", "Ym9i" },
00360           { "bog", "Ym9n" },
00361           { "bon", "Ym9u" },
00362           { "boo", "Ym9v" },
00363           { "bop", "Ym9w" },
00364           { "bow", "Ym93" },
00365           { "box", "Ym94" },
00366           { "boy", "Ym95" },
00367           { "b's", "Yidz" },
00368           { "BTL", "QlRM" },
00369           { "BTU", "QlRV" },
00370           { "bub", "YnVi" },
00371           { "bud", "YnVk" },
00372           { "bug", "YnVn" },
00373           { "bum", "YnVt" },
00374           { "bun", "YnVu" },
00375           { "bus", "YnVz" },
00376           { "but", "YnV0" },
00377           { "buy", "YnV5" },
00378           { "bye", "Ynll" },
00379           { "cab", "Y2Fi" },
00380           { "Cal", "Q2Fs" },
00381           { "cam", "Y2Ft" },
00382           { "can", "Y2Fu" },
00383           { "cap", "Y2Fw" },
00384           { "car", "Y2Fy" },
00385           { "cat", "Y2F0" },
00386           { "caw", "Y2F3" },
00387           { "CBS", "Q0JT" },
00388           { "CDC", "Q0RD" },
00389           { "CEQ", "Q0VR" },
00390           { "chi", "Y2hp" },
00391           { "CIA", "Q0lB" },
00392           { "cit", "Y2l0" },
00393           { "cod", "Y29k" },
00394           { "cog", "Y29n" },
00395           { "col", "Y29s" },
00396           { "con", "Y29u" },
00397           { "coo", "Y29v" },
00398           { "cop", "Y29w" },
00399           { "cos", "Y29z" },
00400           { "cot", "Y290" },
00401           { "cow", "Y293" },
00402           { "cox", "Y294" },
00403           { "coy", "Y295" },
00404           { "CPA", "Q1BB" },
00405           { "cpu", "Y3B1" },
00406           { "CRT", "Q1JU" },
00407           { "cry", "Y3J5" },
00408           { "c's", "Yydz" },
00409           { "cub", "Y3Vi" },
00410           { "cud", "Y3Vk" },
00411           { "cue", "Y3Vl" },
00412           { "cup", "Y3Vw" },
00413           { "cur", "Y3Vy" },
00414           { "cut", "Y3V0" },
00415           { "dab", "ZGFi" },
00416           { "dad", "ZGFk" },
00417           { "dam", "ZGFt" },
00418           { "Dan", "RGFu" },
00419           { "Dar", "RGFy" },
00420           { "day", "ZGF5" },
00421           { "Dec", "RGVj" },
00422           { "Dee", "RGVl" },
00423           { "Del", "RGVs" },
00424           { "den", "ZGVu" },
00425           { "Des", "RGVz" },
00426           { "dew", "ZGV3" },
00427           { "dey", "ZGV5" },
00428           { "did", "ZGlk" },
00429           { "die", "ZGll" },
00430           { "dig", "ZGln" },
00431           { "dim", "ZGlt" },
00432           { "din", "ZGlu" },
00433           { "dip", "ZGlw" },
00434           { "Dis", "RGlz" },
00435           { "DNA", "RE5B" },
00436           { "DOD", "RE9E" },
00437           { "doe", "ZG9l" },
00438           { "dog", "ZG9n" },
00439           { "don", "ZG9u" },
00440           { "dot", "ZG90" },
00441           { "Dow", "RG93" },
00442           { "dry", "ZHJ5" },
00443           { "d's", "ZCdz" },
00444           { "dub", "ZHVi" },
00445           { "dud", "ZHVk" },
00446           { "due", "ZHVl" },
00447           { "dug", "ZHVn" },
00448           { "dun", "ZHVu" },
00449           { "dye", "ZHll" },
00450           { "ear", "ZWFy" },
00451           { "eat", "ZWF0" },
00452           { "ebb", "ZWJi" },
00453           { "EDT", "RURU" },
00454           { "eel", "ZWVs" },
00455           { "eft", "ZWZ0" },
00456           { "e.g", "ZS5n" },
00457           { "egg", "ZWdn" },
00458           { "ego", "ZWdv" },
00459           { "eke", "ZWtl" },
00460           { "Eli", "RWxp" },
00461           { "elk", "ZWxr" },
00462           { "ell", "ZWxs" },
00463           { "elm", "ZWxt" },
00464           { "Ely", "RWx5" },
00465           { "end", "ZW5k" },
00466           { "Eng", "RW5n" },
00467           { "EPA", "RVBB" },
00468           { "era", "ZXJh" },
00469           { "ere", "ZXJl" },
00470           { "erg", "ZXJn" },
00471           { "err", "ZXJy" },
00472           { "e's", "ZSdz" },
00473           { "EST", "RVNU" },
00474           { "eta", "ZXRh" },
00475           { "etc", "ZXRj" },
00476           { "Eva", "RXZh" },
00477           { "eve", "ZXZl" },
00478           { "ewe", "ZXdl" },
00479           { "eye", "ZXll" },
00480           { "FAA", "RkFB" },
00481           { "fad", "ZmFk" },
00482           { "fag", "ZmFn" },
00483           { "fan", "ZmFu" },
00484           { "far", "ZmFy" },
00485           { "fat", "ZmF0" },
00486           { "fay", "ZmF5" },
00487           { "FBI", "RkJJ" },
00488           { "FCC", "RkND" },
00489           { "FDA", "RkRB" },
00490           { "Feb", "RmVi" },
00491           { "fed", "ZmVk" },
00492           { "fee", "ZmVl" },
00493           { "few", "ZmV3" },
00494           { "fib", "Zmli" },
00495           { "fig", "Zmln" },
00496           { "fin", "Zmlu" },
00497           { "fir", "Zmly" },
00498           { "fit", "Zml0" },
00499           { "fix", "Zml4" },
00500           { "Flo", "Rmxv" },
00501           { "flu", "Zmx1" },
00502           { "fly", "Zmx5" },
00503           { "FMC", "Rk1D" },
00504           { "fob", "Zm9i" },
00505           { "foe", "Zm9l" },
00506           { "fog", "Zm9n" },
00507           { "fop", "Zm9w" },
00508           { "for", "Zm9y" },
00509           { "fox", "Zm94" },
00510           { "FPC", "RlBD" },
00511           { "fro", "ZnJv" },
00512           { "fry", "ZnJ5" },
00513           { "f's", "Zidz" },
00514           { "FTC", "RlRD" },
00515           { "fum", "ZnVt" },
00516           { "fun", "ZnVu" },
00517           { "fur", "ZnVy" },
00518           { "gab", "Z2Fi" },
00519           { "gad", "Z2Fk" },
00520           { "gag", "Z2Fn" },
00521           { "gal", "Z2Fs" },
00522           { "gam", "Z2Ft" },
00523           { "GAO", "R0FP" },
00524           { "gap", "Z2Fw" },
00525           { "gar", "Z2Fy" },
00526           { "gas", "Z2Fz" },
00527           { "gay", "Z2F5" },
00528           { "gee", "Z2Vl" },
00529           { "gel", "Z2Vs" },
00530           { "gem", "Z2Vt" },
00531           { "get", "Z2V0" },
00532           { "gig", "Z2ln" },
00533           { "Gil", "R2ls" },
00534           { "gin", "Z2lu" },
00535           { "GMT", "R01U" },
00536           { "GNP", "R05Q" },
00537           { "gnu", "Z251" },
00538           { "Goa", "R29h" },
00539           { "gob", "Z29i" },
00540           { "god", "Z29k" },
00541           { "gog", "Z29n" },
00542           { "GOP", "R09Q" },
00543           { "got", "Z290" },
00544           { "GPO", "R1BP" },
00545           { "g's", "Zydz" },
00546           { "GSA", "R1NB" },
00547           { "gum", "Z3Vt" },
00548           { "gun", "Z3Vu" },
00549           { "Gus", "R3Vz" },
00550           { "gut", "Z3V0" },
00551           { "guy", "Z3V5" },
00552           { "gym", "Z3lt" },
00553           { "gyp", "Z3lw" },
00554           { "had", "aGFk" },
00555           { "Hal", "SGFs" },
00556           { "ham", "aGFt" },
00557           { "Han", "SGFu" },
00558           { "hap", "aGFw" },
00559           { "hat", "aGF0" },
00560           { "haw", "aGF3" },
00561           { "hay", "aGF5" },
00562           { "hem", "aGVt" },
00563           { "hen", "aGVu" },
00564           { "her", "aGVy" },
00565           { "hew", "aGV3" },
00566           { "hex", "aGV4" },
00567           { "hey", "aGV5" },
00568           { "hid", "aGlk" },
00569           { "him", "aGlt" },
00570           { "hip", "aGlw" },
00571           { "his", "aGlz" },
00572           { "hit", "aGl0" },
00573           { "hob", "aG9i" },
00574           { "hoc", "aG9j" },
00575           { "hoe", "aG9l" },
00576           { "hog", "aG9n" },
00577           { "hoi", "aG9p" },
00578           { "Hom", "SG9t" },
00579           { "hop", "aG9w" },
00580           { "hot", "aG90" },
00581           { "how", "aG93" },
00582           { "hoy", "aG95" },
00583           { "h's", "aCdz" },
00584           { "hub", "aHVi" },
00585           { "hue", "aHVl" },
00586           { "hug", "aHVn" },
00587           { "huh", "aHVo" },
00588           { "hum", "aHVt" },
00589           { "Hun", "SHVu" },
00590           { "hut", "aHV0" },
00591           { "Ian", "SWFu" },
00592           { "IBM", "SUJN" },
00593           { "Ibn", "SWJu" },
00594           { "ICC", "SUND" },
00595           { "ice", "aWNl" },
00596           { "icy", "aWN5" },
00597           { "I'd", "SSdk" },
00598           { "Ida", "SWRh" },
00599           { "i.e", "aS5l" },
00600           { "iii", "aWlp" },
00601           { "Ike", "SWtl" },
00602           { "ill", "aWxs" },
00603           { "I'm", "SSdt" },
00604           { "imp", "aW1w" },
00605           { "Inc", "SW5j" },
00606           { "ink", "aW5r" },
00607           { "inn", "aW5u" },
00608           { "ion", "aW9u" },
00609           { "Ira", "SXJh" },
00610           { "ire", "aXJl" },
00611           { "irk", "aXJr" },
00612           { "IRS", "SVJT" },
00613           { "i's", "aSdz" },
00614           { "Ito", "SXRv" },
00615           { "ITT", "SVRU" },
00616           { "ivy", "aXZ5" },
00617           { "jab", "amFi" },
00618           { "jag", "amFn" },
00619           { "jam", "amFt" },
00620           { "Jan", "SmFu" },
00621           { "jar", "amFy" },
00622           { "jaw", "amF3" },
00623           { "jay", "amF5" },
00624           { "Jed", "SmVk" },
00625           { "jet", "amV0" },
00626           { "Jew", "SmV3" },
00627           { "jig", "amln" },
00628           { "Jim", "Smlt" },
00629           { "job", "am9i" },
00630           { "Joe", "Sm9l" },
00631           { "jog", "am9n" },
00632           { "Jon", "Sm9u" },
00633           { "jot", "am90" },
00634           { "joy", "am95" },
00635           { "j's", "aidz" },
00636           { "jug", "anVn" },
00637           { "jut", "anV0" },
00638           { "Kay", "S2F5" },
00639           { "keg", "a2Vn" },
00640           { "ken", "a2Vu" },
00641           { "key", "a2V5" },
00642           { "kid", "a2lk" },
00643           { "Kim", "S2lt" },
00644           { "kin", "a2lu" },
00645           { "kit", "a2l0" },
00646           { "k's", "aydz" },
00647           { "lab", "bGFi" },
00648           { "lac", "bGFj" },
00649           { "lad", "bGFk" },
00650           { "lag", "bGFn" },
00651           { "lam", "bGFt" },
00652           { "Lao", "TGFv" },
00653           { "lap", "bGFw" },
00654           { "law", "bGF3" },
00655           { "lax", "bGF4" },
00656           { "lay", "bGF5" },
00657           { "lea", "bGVh" },
00658           { "led", "bGVk" },
00659           { "lee", "bGVl" },
00660           { "leg", "bGVn" },
00661           { "Len", "TGVu" },
00662           { "Leo", "TGVv" },
00663           { "let", "bGV0" },
00664           { "Lev", "TGV2" },
00665           { "Lew", "TGV3" },
00666           { "lew", "bGV3" },
00667           { "lid", "bGlk" },
00668           { "lie", "bGll" },
00669           { "lim", "bGlt" },
00670           { "Lin", "TGlu" },
00671           { "lip", "bGlw" },
00672           { "lit", "bGl0" },
00673           { "Liz", "TGl6" },
00674           { "lob", "bG9i" },
00675           { "log", "bG9n" },
00676           { "lop", "bG9w" },
00677           { "Los", "TG9z" },
00678           { "lot", "bG90" },
00679           { "Lou", "TG91" },
00680           { "low", "bG93" },
00681           { "loy", "bG95" },
00682           { "l's", "bCdz" },
00683           { "LSI", "TFNJ" },
00684           { "Ltd", "THRk" },
00685           { "LTV", "TFRW" },
00686           { "lug", "bHVn" },
00687           { "lux", "bHV4" },
00688           { "lye", "bHll" },
00689           { "Mac", "TWFj" },
00690           { "mad", "bWFk" },
00691           { "Mae", "TWFl" },
00692           { "man", "bWFu" },
00693           { "Mao", "TWFv" },
00694           { "map", "bWFw" },
00695           { "mar", "bWFy" },
00696           { "mat", "bWF0" },
00697           { "maw", "bWF3" },
00698           { "Max", "TWF4" },
00699           { "max", "bWF4" },
00700           { "may", "bWF5" },
00701           { "MBA", "TUJB" },
00702           { "Meg", "TWVn" },
00703           { "Mel", "TWVs" },
00704           { "men", "bWVu" },
00705           { "met", "bWV0" },
00706           { "mew", "bWV3" },
00707           { "mid", "bWlk" },
00708           { "mig", "bWln" },
00709           { "min", "bWlu" },
00710           { "MIT", "TUlU" },
00711           { "mix", "bWl4" },
00712           { "mob", "bW9i" },
00713           { "Moe", "TW9l" },
00714           { "moo", "bW9v" },
00715           { "mop", "bW9w" },
00716           { "mot", "bW90" },
00717           { "mow", "bW93" },
00718           { "MPH", "TVBI" },
00719           { "Mrs", "TXJz" },
00720           { "m's", "bSdz" },
00721           { "mud", "bXVk" },
00722           { "mug", "bXVn" },
00723           { "mum", "bXVt" },
00724           { "nab", "bmFi" },
00725           { "nag", "bmFn" },
00726           { "Nan", "TmFu" },
00727           { "nap", "bmFw" },
00728           { "Nat", "TmF0" },
00729           { "nay", "bmF5" },
00730           { "NBC", "TkJD" },
00731           { "NBS", "TkJT" },
00732           { "NCO", "TkNP" },
00733           { "NCR", "TkNS" },
00734           { "Ned", "TmVk" },
00735           { "nee", "bmVl" },
00736           { "net", "bmV0" },
00737           { "new", "bmV3" },
00738           { "nib", "bmli" },
00739           { "NIH", "TklI" },
00740           { "nil", "bmls" },
00741           { "nip", "bmlw" },
00742           { "nit", "bml0" },
00743           { "NNE", "Tk5F" },
00744           { "NNW", "Tk5X" },
00745           { "nob", "bm9i" },
00746           { "nod", "bm9k" },
00747           { "non", "bm9u" },
00748           { "nor", "bm9y" },
00749           { "not", "bm90" },
00750           { "Nov", "Tm92" },
00751           { "now", "bm93" },
00752           { "NRC", "TlJD" },
00753           { "n's", "bidz" },
00754           { "NSF", "TlNG" },
00755           { "nun", "bnVu" },
00756           { "nut", "bnV0" },
00757           { "NYC", "TllD" },
00758           { "NYU", "TllV" },
00759           { "oaf", "b2Fm" },
00760           { "oak", "b2Fr" },
00761           { "oar", "b2Fy" },
00762           { "oat", "b2F0" },
00763           { "Oct", "T2N0" },
00764           { "odd", "b2Rk" },
00765           { "ode", "b2Rl" },
00766           { "off", "b2Zm" },
00767           { "oft", "b2Z0" },
00768           { "ohm", "b2ht" },
00769           { "oil", "b2ls" },
00770           { "old", "b2xk" },
00771           { "one", "b25l" },
00772           { "opt", "b3B0" },
00773           { "orb", "b3Ji" },
00774           { "ore", "b3Jl" },
00775           { "Orr", "T3Jy" },
00776           { "o's", "bydz" },
00777           { "Ott", "T3R0" },
00778           { "our", "b3Vy" },
00779           { "out", "b3V0" },
00780           { "ova", "b3Zh" },
00781           { "owe", "b3dl" },
00782           { "owl", "b3ds" },
00783           { "own", "b3du" },
00784           { "pad", "cGFk" },
00785           { "pal", "cGFs" },
00786           { "Pam", "UGFt" },
00787           { "pan", "cGFu" },
00788           { "pap", "cGFw" },
00789           { "par", "cGFy" },
00790           { "pat", "cGF0" },
00791           { "paw", "cGF3" },
00792           { "pax", "cGF4" },
00793           { "pay", "cGF5" },
00794           { "Paz", "UGF6" },
00795           { "PBS", "UEJT" },
00796           { "PDP", "UERQ" },
00797           { "pea", "cGVh" },
00798           { "pee", "cGVl" },
00799           { "peg", "cGVn" },
00800           { "pen", "cGVu" },
00801           { "pep", "cGVw" },
00802           { "per", "cGVy" },
00803           { "pet", "cGV0" },
00804           { "pew", "cGV3" },
00805           { "PhD", "UGhE" },
00806           { "phi", "cGhp" },
00807           { "pie", "cGll" },
00808           { "pig", "cGln" },
00809           { "pin", "cGlu" },
00810           { "pip", "cGlw" },
00811           { "pit", "cGl0" },
00812           { "ply", "cGx5" },
00813           { "pod", "cG9k" },
00814           { "Poe", "UG9l" },
00815           { "poi", "cG9p" },
00816           { "pol", "cG9s" },
00817           { "pop", "cG9w" },
00818           { "pot", "cG90" },
00819           { "pow", "cG93" },
00820           { "ppm", "cHBt" },
00821           { "pro", "cHJv" },
00822           { "pry", "cHJ5" },
00823           { "p's", "cCdz" },
00824           { "psi", "cHNp" },
00825           { "PTA", "UFRB" },
00826           { "pub", "cHVi" },
00827           { "PUC", "UFVD" },
00828           { "pug", "cHVn" },
00829           { "pun", "cHVu" },
00830           { "pup", "cHVw" },
00831           { "pus", "cHVz" },
00832           { "put", "cHV0" },
00833           { "PVC", "UFZD" },
00834           { "QED", "UUVE" },
00835           { "q's", "cSdz" },
00836           { "qua", "cXVh" },
00837           { "quo", "cXVv" },
00838           { "Rae", "UmFl" },
00839           { "rag", "cmFn" },
00840           { "raj", "cmFq" },
00841           { "ram", "cmFt" },
00842           { "ran", "cmFu" },
00843           { "rap", "cmFw" },
00844           { "rat", "cmF0" },
00845           { "raw", "cmF3" },
00846           { "ray", "cmF5" },
00847           { "RCA", "UkNB" },
00848           { "R&D", "UiZE" },
00849           { "reb", "cmVi" },
00850           { "red", "cmVk" },
00851           { "rep", "cmVw" },
00852           { "ret", "cmV0" },
00853           { "rev", "cmV2" },
00854           { "Rex", "UmV4" },
00855           { "rho", "cmhv" },
00856           { "rib", "cmli" },
00857           { "rid", "cmlk" },
00858           { "rig", "cmln" },
00859           { "rim", "cmlt" },
00860           { "Rio", "Umlv" },
00861           { "rip", "cmlw" },
00862           { "RNA", "Uk5B" },
00863           { "rob", "cm9i" },
00864           { "rod", "cm9k" },
00865           { "roe", "cm9l" },
00866           { "Ron", "Um9u" },
00867           { "rot", "cm90" },
00868           { "row", "cm93" },
00869           { "Roy", "Um95" },
00870           { "RPM", "UlBN" },
00871           { "r's", "cidz" },
00872           { "rub", "cnVi" },
00873           { "rue", "cnVl" },
00874           { "rug", "cnVn" },
00875           { "rum", "cnVt" },
00876           { "run", "cnVu" },
00877           { "rut", "cnV0" },
00878           { "rye", "cnll" },
00879           { "sac", "c2Fj" },
00880           { "sad", "c2Fk" },
00881           { "sag", "c2Fn" },
00882           { "Sal", "U2Fs" },
00883           { "Sam", "U2Ft" },
00884           { "San", "U2Fu" },
00885           { "Sao", "U2Fv" },
00886           { "sap", "c2Fw" },
00887           { "sat", "c2F0" },
00888           { "saw", "c2F3" },
00889           { "sax", "c2F4" },
00890           { "say", "c2F5" },
00891           { "Sci", "U2Np" },
00892           { "SCM", "U0NN" },
00893           { "sea", "c2Vh" },
00894           { "sec", "c2Vj" },
00895           { "see", "c2Vl" },
00896           { "sen", "c2Vu" },
00897           { "seq", "c2Vx" },
00898           { "set", "c2V0" },
00899           { "sew", "c2V3" },
00900           { "sex", "c2V4" },
00901           { "she", "c2hl" },
00902           { "Shu", "U2h1" },
00903           { "shy", "c2h5" },
00904           { "sib", "c2li" },
00905           { "sic", "c2lj" },
00906           { "sin", "c2lu" },
00907           { "sip", "c2lw" },
00908           { "sir", "c2ly" },
00909           { "sis", "c2lz" },
00910           { "sit", "c2l0" },
00911           { "six", "c2l4" },
00912           { "ski", "c2tp" },
00913           { "sky", "c2t5" },
00914           { "sly", "c2x5" },
00915           { "sob", "c29i" },
00916           { "Soc", "U29j" },
00917           { "sod", "c29k" },
00918           { "Sol", "U29s" },
00919           { "son", "c29u" },
00920           { "sop", "c29w" },
00921           { "sou", "c291" },
00922           { "sow", "c293" },
00923           { "soy", "c295" },
00924           { "spa", "c3Bh" },
00925           { "spy", "c3B5" },
00926           { "Sri", "U3Jp" },
00927           { "s's", "cydz" },
00928           { "SSE", "U1NF" },
00929           { "SST", "U1NU" },
00930           { "SSW", "U1NX" },
00931           { "Stu", "U3R1" },
00932           { "sub", "c3Vi" },
00933           { "sud", "c3Vk" },
00934           { "sue", "c3Vl" },
00935           { "sum", "c3Vt" },
00936           { "sun", "c3Vu" },
00937           { "sup", "c3Vw" },
00938           { "Sus", "U3Vz" },
00939           { "tab", "dGFi" },
00940           { "tad", "dGFk" },
00941           { "tag", "dGFn" },
00942           { "tam", "dGFt" },
00943           { "tan", "dGFu" },
00944           { "tao", "dGFv" },
00945           { "tap", "dGFw" },
00946           { "tar", "dGFy" },
00947           { "tat", "dGF0" },
00948           { "tau", "dGF1" },
00949           { "tax", "dGF4" },
00950           { "tea", "dGVh" },
00951           { "Ted", "VGVk" },
00952           { "ted", "dGVk" },
00953           { "tee", "dGVl" },
00954           { "Tel", "VGVs" },
00955           { "ten", "dGVu" },
00956           { "the", "dGhl" },
00957           { "thy", "dGh5" },
00958           { "tic", "dGlj" },
00959           { "tid", "dGlk" },
00960           { "tie", "dGll" },
00961           { "til", "dGls" },
00962           { "Tim", "VGlt" },
00963           { "tin", "dGlu" },
00964           { "tip", "dGlw" },
00965           { "tit", "dGl0" },
00966           { "TNT", "VE5U" },
00967           { "toe", "dG9l" },
00968           { "tog", "dG9n" },
00969           { "Tom", "VG9t" },
00970           { "ton", "dG9u" },
00971           { "too", "dG9v" },
00972           { "top", "dG9w" },
00973           { "tor", "dG9y" },
00974           { "tot", "dG90" },
00975           { "tow", "dG93" },
00976           { "toy", "dG95" },
00977           { "TRW", "VFJX" },
00978           { "try", "dHJ5" },
00979           { "t's", "dCdz" },
00980           { "TTL", "VFRM" },
00981           { "TTY", "VFRZ" },
00982           { "tub", "dHVi" },
00983           { "tug", "dHVn" },
00984           { "tum", "dHVt" },
00985           { "tun", "dHVu" },
00986           { "TVA", "VFZB" },
00987           { "TWA", "VFdB" },
00988           { "two", "dHdv" },
00989           { "TWX", "VFdY" },
00990           { "ugh", "dWdo" },
00991           { "UHF", "VUhG" },
00992           { "Uri", "VXJp" },
00993           { "urn", "dXJu" },
00994           { "U.S", "VS5T" },
00995           { "u's", "dSdz" },
00996           { "USA", "VVNB" },
00997           { "USC", "VVND" },
00998           { "use", "dXNl" },
00999           { "USN", "VVNO" },
01000           { "van", "dmFu" },
01001           { "vat", "dmF0" },
01002           { "vee", "dmVl" },
01003           { "vet", "dmV0" },
01004           { "vex", "dmV4" },
01005           { "VHF", "VkhG" },
01006           { "via", "dmlh" },
01007           { "vie", "dmll" },
01008           { "vii", "dmlp" },
01009           { "vis", "dmlz" },
01010           { "viz", "dml6" },
01011           { "von", "dm9u" },
01012           { "vow", "dm93" },
01013           { "v's", "didz" },
01014           { "WAC", "V0FD" },
01015           { "wad", "d2Fk" },
01016           { "wag", "d2Fn" },
01017           { "wah", "d2Fo" },
01018           { "wan", "d2Fu" },
01019           { "war", "d2Fy" },
01020           { "was", "d2Fz" },
01021           { "wax", "d2F4" },
01022           { "way", "d2F5" },
01023           { "web", "d2Vi" },
01024           { "wed", "d2Vk" },
01025           { "wee", "d2Vl" },
01026           { "Wei", "V2Vp" },
01027           { "wet", "d2V0" },
01028           { "who", "d2hv" },
01029           { "why", "d2h5" },
01030           { "wig", "d2ln" },
01031           { "win", "d2lu" },
01032           { "wit", "d2l0" },
01033           { "woe", "d29l" },
01034           { "wok", "d29r" },
01035           { "won", "d29u" },
01036           { "woo", "d29v" },
01037           { "wop", "d29w" },
01038           { "wow", "d293" },
01039           { "wry", "d3J5" },
01040           { "w's", "dydz" },
01041           { "x's", "eCdz" },
01042           { "yah", "eWFo" },
01043           { "yak", "eWFr" },
01044           { "yam", "eWFt" },
01045           { "yap", "eWFw" },
01046           { "yaw", "eWF3" },
01047           { "yea", "eWVh" },
01048           { "yen", "eWVu" },
01049           { "yet", "eWV0" },
01050           { "yin", "eWlu" },
01051           { "yip", "eWlw" },
01052           { "yon", "eW9u" },
01053           { "you", "eW91" },
01054           { "yow", "eW93" },
01055           { "y's", "eSdz" },
01056           { "yuh", "eXVo" },
01057           { "zag", "emFn" },
01058           { "Zan", "WmFu" },
01059           { "zap", "emFw" },
01060           { "Zen", "WmVu" },
01061           { "zig", "emln" },
01062           { "zip", "emlw" },
01063           { "Zoe", "Wm9l" },
01064           { "zoo", "em9v" },
01065           { "z's", "eidz" },
01066           /* the false rumors file */
01067           { "\"So when I die, the first thing I will see in heaven is a score list?\"", 
01068             "IlNvIHdoZW4gSSBkaWUsIHRoZSBmaXJzdCB0aGluZyBJIHdpbGwgc2VlIGluIGhlYXZlbiBpcyBhIHNjb3JlIGxpc3Q/Ig==" },
01069           { "1st Law of Hacking: leaving is much more difficult than entering.", 
01070             "MXN0IExhdyBvZiBIYWNraW5nOiBsZWF2aW5nIGlzIG11Y2ggbW9yZSBkaWZmaWN1bHQgdGhhbiBlbnRlcmluZy4=" },
01071           { "2nd Law of Hacking: first in, first out.", 
01072             "Mm5kIExhdyBvZiBIYWNraW5nOiBmaXJzdCBpbiwgZmlyc3Qgb3V0Lg==" },
01073           { "3rd Law of Hacking: the last blow counts most.", 
01074             "M3JkIExhdyBvZiBIYWNraW5nOiB0aGUgbGFzdCBibG93IGNvdW50cyBtb3N0Lg==" },
01075           { "4th Law of Hacking: you will find the exit at the entrance.", 
01076             "NHRoIExhdyBvZiBIYWNraW5nOiB5b3Ugd2lsbCBmaW5kIHRoZSBleGl0IGF0IHRoZSBlbnRyYW5jZS4=" },
01077           { "A chameleon imitating a mail daemon often delivers scrolls of fire.", 
01078             "QSBjaGFtZWxlb24gaW1pdGF0aW5nIGEgbWFpbCBkYWVtb24gb2Z0ZW4gZGVsaXZlcnMgc2Nyb2xscyBvZiBmaXJlLg==" },
01079           { "A cockatrice corpse is guaranteed to be untainted!", 
01080             "QSBjb2NrYXRyaWNlIGNvcnBzZSBpcyBndWFyYW50ZWVkIHRvIGJlIHVudGFpbnRlZCE=" },
01081           { "A dead cockatrice is just a dead lizard.", 
01082             "QSBkZWFkIGNvY2thdHJpY2UgaXMganVzdCBhIGRlYWQgbGl6YXJkLg==" },
01083           { "A dragon is just a snake that ate a scroll of fire.", 
01084             "QSBkcmFnb24gaXMganVzdCBhIHNuYWtlIHRoYXQgYXRlIGEgc2Nyb2xsIG9mIGZpcmUu" },
01085           { "A fading corridor enlightens your insight.", 
01086             "QSBmYWRpbmcgY29ycmlkb3IgZW5saWdodGVucyB5b3VyIGluc2lnaHQu" },
01087           { "A glowing potion is too hot to drink.", 
01088             "QSBnbG93aW5nIHBvdGlvbiBpcyB0b28gaG90IHRvIGRyaW5rLg==" },
01089           { "A good amulet may protect you against guards.", 
01090             "QSBnb29kIGFtdWxldCBtYXkgcHJvdGVjdCB5b3UgYWdhaW5zdCBndWFyZHMu" },
01091           { "A lizard corpse is a good thing to turn undead.", 
01092             "QSBsaXphcmQgY29ycHNlIGlzIGEgZ29vZCB0aGluZyB0byB0dXJuIHVuZGVhZC4=" },
01093           { "A long worm can be defined recursively. So how should you attack it?", 
01094             "QSBsb25nIHdvcm0gY2FuIGJlIGRlZmluZWQgcmVjdXJzaXZlbHkuIFNvIGhvdyBzaG91bGQgeW91IGF0dGFjayBpdD8=" },
01095           { "A monstrous mind is a toy forever.", 
01096             "QSBtb25zdHJvdXMgbWluZCBpcyBhIHRveSBmb3JldmVyLg==" },
01097           { "A nymph will be very pleased if you call her by her real name: Lorelei.", 
01098             "QSBueW1waCB3aWxsIGJlIHZlcnkgcGxlYXNlZCBpZiB5b3UgY2FsbCBoZXIgYnkgaGVyIHJlYWwgbmFtZTogTG9yZWxlaS4=" },
01099           { "A ring of dungeon master control is a great find.", 
01100             "QSByaW5nIG9mIGR1bmdlb24gbWFzdGVyIGNvbnRyb2wgaXMgYSBncmVhdCBmaW5kLg==" },
01101           { "A ring of extra ring finger is useless if not enchanted.", 
01102             "QSByaW5nIG9mIGV4dHJhIHJpbmcgZmluZ2VyIGlzIHVzZWxlc3MgaWYgbm90IGVuY2hhbnRlZC4=" },
01103           { "A rope may form a trail in a maze.", 
01104             "QSByb3BlIG1heSBmb3JtIGEgdHJhaWwgaW4gYSBtYXplLg==" },
01105           { "A staff may recharge if you drop it for awhile.", 
01106             "QSBzdGFmZiBtYXkgcmVjaGFyZ2UgaWYgeW91IGRyb3AgaXQgZm9yIGF3aGlsZS4=" },
01107           { "A visit to the Zoo is very educational; you meet interesting animals.", 
01108             "QSB2aXNpdCB0byB0aGUgWm9vIGlzIHZlcnkgZWR1Y2F0aW9uYWw7IHlvdSBtZWV0IGludGVyZXN0aW5nIGFuaW1hbHMu" },
01109           { "A wand of deaf is a more dangerous weapon than a wand of sheep.", 
01110             "QSB3YW5kIG9mIGRlYWYgaXMgYSBtb3JlIGRhbmdlcm91cyB3ZWFwb24gdGhhbiBhIHdhbmQgb2Ygc2hlZXAu" },
01111           { "A wand of vibration might bring the whole cave crashing about your ears.", 
01112             "QSB3YW5kIG9mIHZpYnJhdGlvbiBtaWdodCBicmluZyB0aGUgd2hvbGUgY2F2ZSBjcmFzaGluZyBhYm91dCB5b3VyIGVhcnMu" },
01113           { "A winner never quits. A quitter never wins.", 
01114             "QSB3aW5uZXIgbmV2ZXIgcXVpdHMuIEEgcXVpdHRlciBuZXZlciB3aW5zLg==" },
01115           { "A wish? Okay, make me a fortune cookie!", 
01116             "QSB3aXNoPyBPa2F5LCBtYWtlIG1lIGEgZm9ydHVuZSBjb29raWUh" },
01117           { "Afraid of mimics? Try to wear a ring of true seeing.", 
01118             "QWZyYWlkIG9mIG1pbWljcz8gVHJ5IHRvIHdlYXIgYSByaW5nIG9mIHRydWUgc2VlaW5nLg==" },
01119           { "All monsters are created evil, but some are more evil than others.", 
01120             "QWxsIG1vbnN0ZXJzIGFyZSBjcmVhdGVkIGV2aWwsIGJ1dCBzb21lIGFyZSBtb3JlIGV2aWwgdGhhbiBvdGhlcnMu" },
01121           { "Always attack a floating eye from behind!", 
01122             "QWx3YXlzIGF0dGFjayBhIGZsb2F0aW5nIGV5ZSBmcm9tIGJlaGluZCE=" },
01123           { "An elven cloak is always the height of fashion.", 
01124             "QW4gZWx2ZW4gY2xvYWsgaXMgYWx3YXlzIHRoZSBoZWlnaHQgb2YgZmFzaGlvbi4=" },
01125           { "Any small object that is accidentally dropped will hide under a larger object.", 
01126             "QW55IHNtYWxsIG9iamVjdCB0aGF0IGlzIGFjY2lkZW50YWxseSBkcm9wcGVkIHdpbGwgaGlkZSB1bmRlciBhIGxhcmdlciBvYmplY3Qu" },
01127           { "Balrogs do not appear above level 20.", 
01128             "QmFscm9ncyBkbyBub3QgYXBwZWFyIGFib3ZlIGxldmVsIDIwLg==" },
01129           { "Banana peels work especially well against Keystone Kops.", 
01130             "QmFuYW5hIHBlZWxzIHdvcmsgZXNwZWNpYWxseSB3ZWxsIGFnYWluc3QgS2V5c3RvbmUgS29wcy4=" },
01131           { "Be careful when eating bananas. Monsters might slip on the peels.", 
01132             "QmUgY2FyZWZ1bCB3aGVuIGVhdGluZyBiYW5hbmFzLiBNb25zdGVycyBtaWdodCBzbGlwIG9uIHRoZSBwZWVscy4=" },
01133           { "Better leave the dungeon; otherwise you might get hurt badly.", 
01134             "QmV0dGVyIGxlYXZlIHRoZSBkdW5nZW9uOyBvdGhlcndpc2UgeW91IG1pZ2h0IGdldCBodXJ0IGJhZGx5Lg==" },
01135           { "Beware of the potion of nitroglycerin -- it's not for the weak of heart.", 
01136             "QmV3YXJlIG9mIHRoZSBwb3Rpb24gb2Ygbml0cm9nbHljZXJpbiAtLSBpdCdzIG5vdCBmb3IgdGhlIHdlYWsgb2YgaGVhcnQu" },
01137           { "Beware: there's always a chance that your wand explodes as you try to zap it!", 
01138             "QmV3YXJlOiB0aGVyZSdzIGFsd2F5cyBhIGNoYW5jZSB0aGF0IHlvdXIgd2FuZCBleHBsb2RlcyBhcyB5b3UgdHJ5IHRvIHphcCBpdCE=" },
01139           { "Beyond the 23rd level lies a happy retirement in a room of your own.", 
01140             "QmV5b25kIHRoZSAyM3JkIGxldmVsIGxpZXMgYSBoYXBweSByZXRpcmVtZW50IGluIGEgcm9vbSBvZiB5b3VyIG93bi4=" },
01141           { "Changing your suit without dropping your sword? You must be kidding!", 
01142             "Q2hhbmdpbmcgeW91ciBzdWl0IHdpdGhvdXQgZHJvcHBpbmcgeW91ciBzd29yZD8gWW91IG11c3QgYmUga2lkZGluZyE=" },
01143           { "Cockatrices might turn themselves to stone faced with a mirror.", 
01144             "Q29ja2F0cmljZXMgbWlnaHQgdHVybiB0aGVtc2VsdmVzIHRvIHN0b25lIGZhY2VkIHdpdGggYSBtaXJyb3Iu" },
01145           { "Consumption of home-made food is strictly forbidden in this dungeon.", 
01146             "Q29uc3VtcHRpb24gb2YgaG9tZS1tYWRlIGZvb2QgaXMgc3RyaWN0bHkgZm9yYmlkZGVuIGluIHRoaXMgZHVuZ2Vvbi4=" },
01147           { "Dark room? Your chance to develop your photographs!", 
01148             "RGFyayByb29tPyBZb3VyIGNoYW5jZSB0byBkZXZlbG9wIHlvdXIgcGhvdG9ncmFwaHMh" },
01149           { "Dark rooms are not *completely* dark: just wait and let your eyes adjust...", 
01150             "RGFyayByb29tcyBhcmUgbm90ICpjb21wbGV0ZWx5KiBkYXJrOiBqdXN0IHdhaXQgYW5kIGxldCB5b3VyIGV5ZXMgYWRqdXN0Li4u" },
01151           { "David London sez, \"Hey guys, *WIELD* a lizard corpse against a cockatrice!\"", 
01152             "RGF2aWQgTG9uZG9uIHNleiwgIkhleSBndXlzLCAqV0lFTEQqIGEgbGl6YXJkIGNvcnBzZSBhZ2FpbnN0IGEgY29ja2F0cmljZSEi" },
01153           { "Death is just life's way of telling you you've been fired.", 
01154             "RGVhdGggaXMganVzdCBsaWZlJ3Mgd2F5IG9mIHRlbGxpbmcgeW91IHlvdSd2ZSBiZWVuIGZpcmVkLg==" },
01155           { "Demi-gods don't need any help from the gods.", 
01156             "RGVtaS1nb2RzIGRvbid0IG5lZWQgYW55IGhlbHAgZnJvbSB0aGUgZ29kcy4=" },
01157           { "Demons *HATE* Priests and Priestesses.", 
01158             "RGVtb25zICpIQVRFKiBQcmllc3RzIGFuZCBQcmllc3Rlc3Nlcy4=" },
01159           { "Didn't you forget to pay?", 
01160             "RGlkbid0IHlvdSBmb3JnZXQgdG8gcGF5Pw==" },
01161           { "Didn't your mother tell you not to eat food off the floor?", 
01162             "RGlkbid0IHlvdXIgbW90aGVyIHRlbGwgeW91IG5vdCB0byBlYXQgZm9vZCBvZmYgdGhlIGZsb29yPw==" },
01163           { "Direct a direct hit on your direct opponent, directing in the right direction.", 
01164             "RGlyZWN0IGEgZGlyZWN0IGhpdCBvbiB5b3VyIGRpcmVjdCBvcHBvbmVudCwgZGlyZWN0aW5nIGluIHRoZSByaWdodCBkaXJlY3Rpb24u" },
01165           { "Do you want to make more money? Sure, we all do! Join the Fort Ludios guard!", 
01166             "RG8geW91IHdhbnQgdG8gbWFrZSBtb3JlIG1vbmV5PyBTdXJlLCB3ZSBhbGwgZG8hIEpvaW4gdGhlIEZvcnQgTHVkaW9zIGd1YXJkIQ==" },
01167           { "Don't eat too much: you might start hiccoughing!", 
01168             "RG9uJ3QgZWF0IHRvbyBtdWNoOiB5b3UgbWlnaHQgc3RhcnQgaGljY291Z2hpbmch" },
01169           { "Don't play hack at your work; your boss might hit you!", 
01170             "RG9uJ3QgcGxheSBoYWNrIGF0IHlvdXIgd29yazsgeW91ciBib3NzIG1pZ2h0IGhpdCB5b3Uh" },
01171           { "Don't tell a soul you found a secret door, otherwise it isn't a secret anymore.", 
01172             "RG9uJ3QgdGVsbCBhIHNvdWwgeW91IGZvdW5kIGEgc2VjcmV0IGRvb3IsIG90aGVyd2lzZSBpdCBpc24ndCBhIHNlY3JldCBhbnltb3JlLg==" },
01173           { "Drinking potions of booze may land you in jail if you are under 21.", 
01174             "RHJpbmtpbmcgcG90aW9ucyBvZiBib296ZSBtYXkgbGFuZCB5b3UgaW4gamFpbCBpZiB5b3UgYXJlIHVuZGVyIDIxLg==" },
01175           { "Drop your vanity and get rid of your jewels! Pickpockets about!", 
01176             "RHJvcCB5b3VyIHZhbml0eSBhbmQgZ2V0IHJpZCBvZiB5b3VyIGpld2VscyEgUGlja3BvY2tldHMgYWJvdXQh" },
01177           { "Eat 10 cloves of garlic and keep all humans at a two-square distance.", 
01178             "RWF0IDEwIGNsb3ZlcyBvZiBnYXJsaWMgYW5kIGtlZXAgYWxsIGh1bWFucyBhdCBhIHR3by1zcXVhcmUgZGlzdGFuY2Uu" },
01179           { "Eels hide under mud. Use a unicorn to clear the water and make them visible.", 
01180             "RWVscyBoaWRlIHVuZGVyIG11ZC4gVXNlIGEgdW5pY29ybiB0byBjbGVhciB0aGUgd2F0ZXIgYW5kIG1ha2UgdGhlbSB2aXNpYmxlLg==" },
01181           { "Engrave your wishes with a wand of wishing.", 
01182             "RW5ncmF2ZSB5b3VyIHdpc2hlcyB3aXRoIGEgd2FuZCBvZiB3aXNoaW5nLg==" },
01183           { "Eventually you will come to admire the swift elegance of a retreating nymph.", 
01184             "RXZlbnR1YWxseSB5b3Ugd2lsbCBjb21lIHRvIGFkbWlyZSB0aGUgc3dpZnQgZWxlZ2FuY2Ugb2YgYSByZXRyZWF0aW5nIG55bXBoLg==" },
01185           { "Ever heard hissing outside? I *knew* you hadn't!", 
01186             "RXZlciBoZWFyZCBoaXNzaW5nIG91dHNpZGU/IEkgKmtuZXcqIHlvdSBoYWRuJ3Qh" },
01187           { "Ever lifted a dragon corpse?", 
01188             "RXZlciBsaWZ0ZWQgYSBkcmFnb24gY29ycHNlPw==" },
01189           { "Ever seen a leocrotta dancing the tengu?", 
01190             "RXZlciBzZWVuIGEgbGVvY3JvdHRhIGRhbmNpbmcgdGhlIHRlbmd1Pw==" },
01191           { "Ever seen your weapon glow plaid?", 
01192             "RXZlciBzZWVuIHlvdXIgd2VhcG9uIGdsb3cgcGxhaWQ/" },
01193           { "Ever tamed a shopkeeper?", 
01194             "RXZlciB0YW1lZCBhIHNob3BrZWVwZXI/" },
01195           { "Ever tried digging through a Vault Guard?", 
01196             "RXZlciB0cmllZCBkaWdnaW5nIHRocm91Z2ggYSBWYXVsdCBHdWFyZD8=" },
01197           { "Ever tried enchanting a rope?", 
01198             "RXZlciB0cmllZCBlbmNoYW50aW5nIGEgcm9wZT8=" },
01199           { "Floating eyes can't stand Hawaiian shirts.", 
01200             "RmxvYXRpbmcgZXllcyBjYW4ndCBzdGFuZCBIYXdhaWlhbiBzaGlydHMu" },
01201           { "For any remedy there is a misery.", 
01202             "Rm9yIGFueSByZW1lZHkgdGhlcmUgaXMgYSBtaXNlcnku" },
01203           { "Giant bats turn into giant vampires.", 
01204             "R2lhbnQgYmF0cyB0dXJuIGludG8gZ2lhbnQgdmFtcGlyZXMu" },
01205           { "Good day for overcoming obstacles. Try a steeplechase.", 
01206             "R29vZCBkYXkgZm9yIG92ZXJjb21pbmcgb2JzdGFjbGVzLiBUcnkgYSBzdGVlcGxlY2hhc2Uu" },
01207           { "Half Moon tonight. (At least it's better than no Moon at all.)", 
01208             "SGFsZiBNb29uIHRvbmlnaHQuIChBdCBsZWFzdCBpdCdzIGJldHRlciB0aGFuIG5vIE1vb24gYXQgYWxsLik=" },
01209           { "Help! I'm being held prisoner in a fortune cookie factory!", 
01210             "SGVscCEgSSdtIGJlaW5nIGhlbGQgcHJpc29uZXIgaW4gYSBmb3J0dW5lIGNvb2tpZSBmYWN0b3J5IQ==" },
01211           { "Housecats have nine lives, kittens only one.", 
01212             "SG91c2VjYXRzIGhhdmUgbmluZSBsaXZlcywga2l0dGVucyBvbmx5IG9uZS4=" },
01213           { "How long can you tread water?", 
01214             "SG93IGxvbmcgY2FuIHlvdSB0cmVhZCB3YXRlcj8=" },
01215           { "Hungry? There is an abundance of food on the next level.", 
01216             "SHVuZ3J5PyBUaGVyZSBpcyBhbiBhYnVuZGFuY2Ugb2YgZm9vZCBvbiB0aGUgbmV4dCBsZXZlbC4=" },
01217           { "I guess you've never hit a mail daemon with the Amulet of Yendor...", 
01218             "SSBndWVzcyB5b3UndmUgbmV2ZXIgaGl0IGEgbWFpbCBkYWVtb24gd2l0aCB0aGUgQW11bGV0IG9mIFllbmRvci4uLg==" },
01219           { "If you are the shopkeeper, you can take things for free.", 
01220             "SWYgeW91IGFyZSB0aGUgc2hvcGtlZXBlciwgeW91IGNhbiB0YWtlIHRoaW5ncyBmb3IgZnJlZS4=" },
01221           { "If you can't learn to do it well, learn to enjoy doing it badly.", 
01222             "SWYgeW91IGNhbid0IGxlYXJuIHRvIGRvIGl0IHdlbGwsIGxlYXJuIHRvIGVuam95IGRvaW5nIGl0IGJhZGx5Lg==" },
01223           { "If you thought the Wizard was bad, just wait till you meet the Warlord!", 
01224             "SWYgeW91IHRob3VnaHQgdGhlIFdpemFyZCB3YXMgYmFkLCBqdXN0IHdhaXQgdGlsbCB5b3UgbWVldCB0aGUgV2FybG9yZCE=" },
01225           { "If you turn blind, don't expect your dog to be turned into a seeing-eye dog.", 
01226             "SWYgeW91IHR1cm4gYmxpbmQsIGRvbid0IGV4cGVjdCB5b3VyIGRvZyB0byBiZSB0dXJuZWQgaW50byBhIHNlZWluZy1leWUgZG9nLg==" },
01227           { "If you want to feel great, you must eat something real big.", 
01228             "SWYgeW91IHdhbnQgdG8gZmVlbCBncmVhdCwgeW91IG11c3QgZWF0IHNvbWV0aGluZyByZWFsIGJpZy4=" },
01229           { "If you want to float, you'd better eat a floating eye.", 
01230             "SWYgeW91IHdhbnQgdG8gZmxvYXQsIHlvdSdkIGJldHRlciBlYXQgYSBmbG9hdGluZyBleWUu" },
01231           { "If your ghost kills a player, it increases your score.", 
01232             "SWYgeW91ciBnaG9zdCBraWxscyBhIHBsYXllciwgaXQgaW5jcmVhc2VzIHlvdXIgc2NvcmUu" },
01233           { "Increase mindpower: Tame your own ghost!", 
01234             "SW5jcmVhc2UgbWluZHBvd2VyOiBUYW1lIHlvdXIgb3duIGdob3N0IQ==" },
01235           { "It furthers one to see the great man.", 
01236             "SXQgZnVydGhlcnMgb25lIHRvIHNlZSB0aGUgZ3JlYXQgbWFuLg==" },
01237           { "It's easy to overlook a monster in a wood.", 
01238             "SXQncyBlYXN5IHRvIG92ZXJsb29rIGEgbW9uc3RlciBpbiBhIHdvb2Qu" },
01239           { "Just below any trapdoor there may be another one. Just keep falling!", 
01240             "SnVzdCBiZWxvdyBhbnkgdHJhcGRvb3IgdGhlcmUgbWF5IGJlIGFub3RoZXIgb25lLiBKdXN0IGtlZXAgZmFsbGluZyE=" },
01241           { "Katanas are very sharp; watch you don't cut yourself.", 
01242             "S2F0YW5hcyBhcmUgdmVyeSBzaGFycDsgd2F0Y2ggeW91IGRvbid0IGN1dCB5b3Vyc2VsZi4=" },
01243           { "Keep a clear mind: quaff clear potions.", 
01244             "S2VlcCBhIGNsZWFyIG1pbmQ6IHF1YWZmIGNsZWFyIHBvdGlvbnMu" },
01245           { "Kicking the terminal doesn't hurt the monsters.", 
01246             "S2lja2luZyB0aGUgdGVybWluYWwgZG9lc24ndCBodXJ0IHRoZSBtb25zdGVycy4=" },
01247           { "Killer bees keep appearing till you kill their queen.", 
01248             "S2lsbGVyIGJlZXMga2VlcCBhcHBlYXJpbmcgdGlsbCB5b3Uga2lsbCB0aGVpciBxdWVlbi4=" },
01249           { "Killer bunnies can be tamed with carrots only.", 
01250             "S2lsbGVyIGJ1bm5pZXMgY2FuIGJlIHRhbWVkIHdpdGggY2Fycm90cyBvbmx5Lg==" },
01251           { "Latest news? Put `rec.games.roguelike.nethack' in your .newsrc!", 
01252             "TGF0ZXN0IG5ld3M/IFB1dCBgcmVjLmdhbWVzLnJvZ3VlbGlrZS5uZXRoYWNrJyBpbiB5b3VyIC5uZXdzcmMh" },
01253           { "Learn how to spell. Play NetHack!", 
01254             "TGVhcm4gaG93IHRvIHNwZWxsLiBQbGF5IE5ldEhhY2sh" },
01255           { "Leprechauns hide their gold in a secret room.", 
01256             "TGVwcmVjaGF1bnMgaGlkZSB0aGVpciBnb2xkIGluIGEgc2VjcmV0IHJvb20u" },
01257           { "Let your fingers do the walking on the yulkjhnb keys.", 
01258             "TGV0IHlvdXIgZmluZ2VycyBkbyB0aGUgd2Fsa2luZyBvbiB0aGUgeXVsa2pobmIga2V5cy4=" },
01259           { "Let's face it: this time you're not going to win.", 
01260             "TGV0J3MgZmFjZSBpdDogdGhpcyB0aW1lIHlvdSdyZSBub3QgZ29pbmcgdG8gd2luLg==" },
01261           { "Let's have a party, drink a lot of booze.", 
01262             "TGV0J3MgaGF2ZSBhIHBhcnR5LCBkcmluayBhIGxvdCBvZiBib296ZS4=" },
01263           { "Liquor sellers do not drink; they hate to see you twice.", 
01264             "TGlxdW9yIHNlbGxlcnMgZG8gbm90IGRyaW5rOyB0aGV5IGhhdGUgdG8gc2VlIHlvdSB0d2ljZS4=" },
01265           { "Lunar eclipse tonight. May as well quit now!", 
01266             "THVuYXIgZWNsaXBzZSB0b25pZ2h0LiBNYXkgYXMgd2VsbCBxdWl0IG5vdyE=" },
01267           { "Meeting your own ghost decreases your luck considerably!", 
01268             "TWVldGluZyB5b3VyIG93biBnaG9zdCBkZWNyZWFzZXMgeW91ciBsdWNrIGNvbnNpZGVyYWJseSE=" },
01269           { "Money to invest? Take it to the local branch of the Magic Memory Vault!", 
01270             "TW9uZXkgdG8gaW52ZXN0PyBUYWtlIGl0IHRvIHRoZSBsb2NhbCBicmFuY2ggb2YgdGhlIE1hZ2ljIE1lbW9yeSBWYXVsdCE=" },
01271           { "Monsters come from nowhere to hit you everywhere.", 
01272             "TW9uc3RlcnMgY29tZSBmcm9tIG5vd2hlcmUgdG8gaGl0IHlvdSBldmVyeXdoZXJlLg==" },
01273           { "Monsters sleep because you are boring, not because they ever get tired.", 
01274             "TW9uc3RlcnMgc2xlZXAgYmVjYXVzZSB5b3UgYXJlIGJvcmluZywgbm90IGJlY2F1c2UgdGhleSBldmVyIGdldCB0aXJlZC4=" },
01275           { "Most monsters prefer minced meat. That's why they are hitting you!", 
01276             "TW9zdCBtb25zdGVycyBwcmVmZXIgbWluY2VkIG1lYXQuIFRoYXQncyB3aHkgdGhleSBhcmUgaGl0dGluZyB5b3Uh" },
01277           { "Most of the bugs in NetHack are on the floor.", 
01278             "TW9zdCBvZiB0aGUgYnVncyBpbiBOZXRIYWNrIGFyZSBvbiB0aGUgZmxvb3Iu" },
01279           { "Much ado Nothing Happens.", 
01280             "TXVjaCBhZG8gTm90aGluZyBIYXBwZW5zLg==" },
01281           { "Multi-player NetHack is a myth.", 
01282             "TXVsdGktcGxheWVyIE5ldEhhY2sgaXMgYSBteXRoLg==" },
01283           { "NetHack is addictive. Too late, you're already hooked.", 
01284             "TmV0SGFjayBpcyBhZGRpY3RpdmUuIFRvbyBsYXRlLCB5b3UncmUgYWxyZWFkeSBob29rZWQu" },
01285           { "Never ask a shopkeeper for a price list.", 
01286             "TmV2ZXIgYXNrIGEgc2hvcGtlZXBlciBmb3IgYSBwcmljZSBsaXN0Lg==" },
01287           { "Never burn a tree, unless you like getting whacked with a +5 shovel.", 
01288             "TmV2ZXIgYnVybiBhIHRyZWUsIHVubGVzcyB5b3UgbGlrZSBnZXR0aW5nIHdoYWNrZWQgd2l0aCBhICs1IHNob3ZlbC4=" },
01289           { "Never eat with glowing hands!", 
01290             "TmV2ZXIgZWF0IHdpdGggZ2xvd2luZyBoYW5kcyE=" },
01291           { "Never mind the monsters hitting you: they just replace the charwomen.", 
01292             "TmV2ZXIgbWluZCB0aGUgbW9uc3RlcnMgaGl0dGluZyB5b3U6IHRoZXkganVzdCByZXBsYWNlIHRoZSBjaGFyd29tZW4u" },
01293           { "Never play leapfrog with a unicorn.", 
01294             "TmV2ZXIgcGxheSBsZWFwZnJvZyB3aXRoIGEgdW5pY29ybi4=" },
01295           { "Never step on a cursed engraving.", 
01296             "TmV2ZXIgc3RlcCBvbiBhIGN1cnNlZCBlbmdyYXZpbmcu" },
01297           { "Never swim with a camera: there's nothing to take pictures of.", 
01298             "TmV2ZXIgc3dpbSB3aXRoIGEgY2FtZXJhOiB0aGVyZSdzIG5vdGhpbmcgdG8gdGFrZSBwaWN0dXJlcyBvZi4=" },
01299           { "Never teach your pet rust monster to fetch.", 
01300             "TmV2ZXIgdGVhY2ggeW91ciBwZXQgcnVzdCBtb25zdGVyIHRvIGZldGNoLg==" },
01301           { "Never trust a random generator in magic fields.", 
01302             "TmV2ZXIgdHJ1c3QgYSByYW5kb20gZ2VuZXJhdG9yIGluIG1hZ2ljIGZpZWxkcy4=" },
01303           { "Never use a wand of death.", 
01304             "TmV2ZXIgdXNlIGEgd2FuZCBvZiBkZWF0aC4=" },
01305           { "No level contains two shops. The maze is no level. So...", 
01306             "Tm8gbGV2ZWwgY29udGFpbnMgdHdvIHNob3BzLiBUaGUgbWF6ZSBpcyBubyBsZXZlbC4gU28uLi4=" },
01307           { "No part of this fortune may be reproduced, stored in a retrieval system, ...", 
01308             "Tm8gcGFydCBvZiB0aGlzIGZvcnR1bmUgbWF5IGJlIHJlcHJvZHVjZWQsIHN0b3JlZCBpbiBhIHJldHJpZXZhbCBzeXN0ZW0sIC4uLg==" },
01309           { "Not all rumors are as misleading as this one.", 
01310             "Tm90IGFsbCBydW1vcnMgYXJlIGFzIG1pc2xlYWRpbmcgYXMgdGhpcyBvbmUu" },
01311           { "Nymphs and nurses like beautiful rings.", 
01312             "TnltcGhzIGFuZCBudXJzZXMgbGlrZSBiZWF1dGlmdWwgcmluZ3Mu" },
01313           { "Nymphs are blondes. Are you a gentleman?", 
01314             "TnltcGhzIGFyZSBibG9uZGVzLiBBcmUgeW91IGEgZ2VudGxlbWFuPw==" },
01315           { "Offering a unicorn a worthless piece of glass might prove to be fatal!", 
01316             "T2ZmZXJpbmcgYSB1bmljb3JuIGEgd29ydGhsZXNzIHBpZWNlIG9mIGdsYXNzIG1pZ2h0IHByb3ZlIHRvIGJlIGZhdGFsIQ==" },
01317           { "Old hackers never die: young ones do.", 
01318             "T2xkIGhhY2tlcnMgbmV2ZXIgZGllOiB5b3VuZyBvbmVzIGRvLg==" },
01319           { "One has to leave shops before closing time.", 
01320             "T25lIGhhcyB0byBsZWF2ZSBzaG9wcyBiZWZvcmUgY2xvc2luZyB0aW1lLg==" },
01321           { "One homunculus a day keeps the doctor away.", 
01322             "T25lIGhvbXVuY3VsdXMgYSBkYXkga2VlcHMgdGhlIGRvY3RvciBhd2F5Lg==" },
01323           { "One level further down somebody is getting killed, right now.", 
01324             "T25lIGxldmVsIGZ1cnRoZXIgZG93biBzb21lYm9keSBpcyBnZXR0aW5nIGtpbGxlZCwgcmlnaHQgbm93Lg==" },
01325           { "Only a wizard can use a magic whistle.", 
01326             "T25seSBhIHdpemFyZCBjYW4gdXNlIGEgbWFnaWMgd2hpc3RsZS4=" },
01327           { "Only adventurers of evil alignment think of killing their dog.", 
01328             "T25seSBhZHZlbnR1cmVycyBvZiBldmlsIGFsaWdubWVudCB0aGluayBvZiBraWxsaW5nIHRoZWlyIGRvZy4=" },
01329           { "Only chaotic evils kill sleeping monsters.", 
01330             "T25seSBjaGFvdGljIGV2aWxzIGtpbGwgc2xlZXBpbmcgbW9uc3RlcnMu" },
01331           { "Only real trappers escape traps.", 
01332             "T25seSByZWFsIHRyYXBwZXJzIGVzY2FwZSB0cmFwcy4=" },
01333           { "Only real wizards can write scrolls.", 
01334             "T25seSByZWFsIHdpemFyZHMgY2FuIHdyaXRlIHNjcm9sbHMu" },
01335           { "Operation OVERKILL has started now.", 
01336             "T3BlcmF0aW9uIE9WRVJLSUxMIGhhcyBzdGFydGVkIG5vdy4=" },
01337           { "PLEASE ignore previous rumor.", 
01338             "UExFQVNFIGlnbm9yZSBwcmV2aW91cyBydW1vci4=" },
01339           { "Polymorph into an ettin; meet your opponents face to face to face.", 
01340             "UG9seW1vcnBoIGludG8gYW4gZXR0aW47IG1lZXQgeW91ciBvcHBvbmVudHMgZmFjZSB0byBmYWNlIHRvIGZhY2Uu" },
01341           { "Praying will frighten demons.", 
01342             "UHJheWluZyB3aWxsIGZyaWdodGVuIGRlbW9ucy4=" },
01343           { "Row (3x) that boat gently down the stream, Charon (4x), death is but a dream.", 
01344             "Um93ICgzeCkgdGhhdCBib2F0IGdlbnRseSBkb3duIHRoZSBzdHJlYW0sIENoYXJvbiAoNHgpLCBkZWF0aCBpcyBidXQgYSBkcmVhbS4=" },
01345           { "Running is good for your legs.", 
01346             "UnVubmluZyBpcyBnb29kIGZvciB5b3VyIGxlZ3Mu" },
01347           { "Screw up your courage! You've screwed up everything else.", 
01348             "U2NyZXcgdXAgeW91ciBjb3VyYWdlISBZb3UndmUgc2NyZXdlZCB1cCBldmVyeXRoaW5nIGVsc2Uu" },
01349           { "Seepage? Leaky pipes? Rising damp? Summon the plumber!", 
01350             "U2VlcGFnZT8gTGVha3kgcGlwZXM/IFJpc2luZyBkYW1wPyBTdW1tb24gdGhlIHBsdW1iZXIh" },
01351           { "Segmentation fault (core dumped).", 
01352             "U2VnbWVudGF0aW9uIGZhdWx0IChjb3JlIGR1bXBlZCku" },
01353           { "Shopkeepers sometimes die from old age.", 
01354             "U2hvcGtlZXBlcnMgc29tZXRpbWVzIGRpZSBmcm9tIG9sZCBhZ2Uu" },
01355           { "Some mazes (especially small ones) have no solutions, says man 6 maze.", 
01356             "U29tZSBtYXplcyAoZXNwZWNpYWxseSBzbWFsbCBvbmVzKSBoYXZlIG5vIHNvbHV0aW9ucywgc2F5cyBtYW4gNiBtYXplLg==" },
01357           { "Some questions the Sphynx asks just *don't* have any answers.", 
01358             "U29tZSBxdWVzdGlvbnMgdGhlIFNwaHlueCBhc2tzIGp1c3QgKmRvbid0KiBoYXZlIGFueSBhbnN3ZXJzLg==" },
01359           { "Sometimes \"mu\" is the answer.", 
01360             "U29tZXRpbWVzICJtdSIgaXMgdGhlIGFuc3dlci4=" },
01361           { "Sorry, no fortune this time. Better luck next cookie!", 
01362             "U29ycnksIG5vIGZvcnR1bmUgdGhpcyB0aW1lLiBCZXR0ZXIgbHVjayBuZXh0IGNvb2tpZSE=" },
01363           { "Spare your scrolls of make-edible until it's really necessary!", 
01364             "U3BhcmUgeW91ciBzY3JvbGxzIG9mIG1ha2UtZWRpYmxlIHVudGlsIGl0J3MgcmVhbGx5IG5lY2Vzc2FyeSE=" },
01365           { "Suddenly, the dungeon will collapse...", 
01366             "U3VkZGVubHksIHRoZSBkdW5nZW9uIHdpbGwgY29sbGFwc2UuLi4=" },
01367           { "Taming a mail daemon may cause a system security violation.", 
01368             "VGFtaW5nIGEgbWFpbCBkYWVtb24gbWF5IGNhdXNlIGEgc3lzdGVtIHNlY3VyaXR5IHZpb2xhdGlvbi4=" },
01369           { "The crowd was so tough, the Stooges won't play the Dungeon anymore, nyuk nyuk.", 
01370             "VGhlIGNyb3dkIHdhcyBzbyB0b3VnaCwgdGhlIFN0b29nZXMgd29uJ3QgcGxheSB0aGUgRHVuZ2VvbiBhbnltb3JlLCBueXVrIG55dWsu" },
01371           { "The leprechauns hide their treasure in a small hidden room.", 
01372             "VGhlIGxlcHJlY2hhdW5zIGhpZGUgdGhlaXIgdHJlYXN1cmUgaW4gYSBzbWFsbCBoaWRkZW4gcm9vbS4=" },
01373           { "The longer the wand the better.", 
01374             "VGhlIGxvbmdlciB0aGUgd2FuZCB0aGUgYmV0dGVyLg==" },
01375           { "The magic word is \"XYZZY\".", 
01376             "VGhlIG1hZ2ljIHdvcmQgaXMgIlhZWlpZIi4=" },
01377           { "The meek shall inherit your bones files.", 
01378             "VGhlIG1lZWsgc2hhbGwgaW5oZXJpdCB5b3VyIGJvbmVzIGZpbGVzLg==" },
01379           { "The mines are dark and deep, and I have levels to go before I sleep.", 
01380             "VGhlIG1pbmVzIGFyZSBkYXJrIGFuZCBkZWVwLCBhbmQgSSBoYXZlIGxldmVscyB0byBnbyBiZWZvcmUgSSBzbGVlcC4=" },
01381           { "The use of dynamite is dangerous.", 
01382             "VGhlIHVzZSBvZiBkeW5hbWl0ZSBpcyBkYW5nZXJvdXMu" },
01383           { "There are no worms in the UNIX version.", 
01384             "VGhlcmUgYXJlIG5vIHdvcm1zIGluIHRoZSBVTklYIHZlcnNpb24u" },
01385           { "There is a trap on this level!", 
01386             "VGhlcmUgaXMgYSB0cmFwIG9uIHRoaXMgbGV2ZWwh" },
01387           { "They say that Demogorgon, Asmodeus, Orcus, Yeenoghu & Juiblex is no law firm.", 
01388             "VGhleSBzYXkgdGhhdCBEZW1vZ29yZ29uLCBBc21vZGV1cywgT3JjdXMsIFllZW5vZ2h1ICYgSnVpYmxleCBpcyBubyBsYXcgZmlybS4=" },
01389           { "They say that Geryon has an evil twin, beware!", 
01390             "VGhleSBzYXkgdGhhdCBHZXJ5b24gaGFzIGFuIGV2aWwgdHdpbiwgYmV3YXJlIQ==" },
01391           { "They say that Medusa would make a terrible pet.", 
01392             "VGhleSBzYXkgdGhhdCBNZWR1c2Egd291bGQgbWFrZSBhIHRlcnJpYmxlIHBldC4=" },
01393           { "They say that NetHack bugs are Seldon planned.", 
01394             "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGJ1Z3MgYXJlIFNlbGRvbiBwbGFubmVkLg==" },
01395           { "They say that NetHack comes in 256 flavors.", 
01396             "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGNvbWVzIGluIDI1NiBmbGF2b3JzLg==" },
01397           { "They say that NetHack is just a computer game.", 
01398             "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIGp1c3QgYSBjb21wdXRlciBnYW1lLg==" },
01399           { "They say that NetHack is more than just a computer game.", 
01400             "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIG1vcmUgdGhhbiBqdXN0IGEgY29tcHV0ZXIgZ2FtZS4=" },
01401           { "They say that NetHack is never what it used to be.", 
01402             "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIG5ldmVyIHdoYXQgaXQgdXNlZCB0byBiZS4=" },
01403           { "They say that a baby dragon is too small to hurt or help you.", 
01404             "VGhleSBzYXkgdGhhdCBhIGJhYnkgZHJhZ29uIGlzIHRvbyBzbWFsbCB0byBodXJ0IG9yIGhlbHAgeW91Lg==" },
01405           { "They say that a black pudding is simply a brown pudding gone bad.", 
01406             "VGhleSBzYXkgdGhhdCBhIGJsYWNrIHB1ZGRpbmcgaXMgc2ltcGx5IGEgYnJvd24gcHVkZGluZyBnb25lIGJhZC4=" },
01407           { "They say that a black sheep has 3 bags full of wool.", 
01408             "VGhleSBzYXkgdGhhdCBhIGJsYWNrIHNoZWVwIGhhcyAzIGJhZ3MgZnVsbCBvZiB3b29sLg==" },
01409           { "They say that a blank scroll is like a blank check.", 
01410             "VGhleSBzYXkgdGhhdCBhIGJsYW5rIHNjcm9sbCBpcyBsaWtlIGEgYmxhbmsgY2hlY2su" },
01411           { "They say that a cat named Morris has nine lives.", 
01412             "VGhleSBzYXkgdGhhdCBhIGNhdCBuYW1lZCBNb3JyaXMgaGFzIG5pbmUgbGl2ZXMu" },
01413           { "They say that a desperate shopper might pay any price in a shop.", 
01414             "VGhleSBzYXkgdGhhdCBhIGRlc3BlcmF0ZSBzaG9wcGVyIG1pZ2h0IHBheSBhbnkgcHJpY2UgaW4gYSBzaG9wLg==" },
01415           { "They say that a diamond dog is everybody's best friend.", 
01416             "VGhleSBzYXkgdGhhdCBhIGRpYW1vbmQgZG9nIGlzIGV2ZXJ5Ym9keSdzIGJlc3QgZnJpZW5kLg==" },
01417           { "They say that a dwarf lord can carry a pick-axe because his armor is light.", 
01418             "VGhleSBzYXkgdGhhdCBhIGR3YXJmIGxvcmQgY2FuIGNhcnJ5IGEgcGljay1heGUgYmVjYXVzZSBoaXMgYXJtb3IgaXMgbGlnaHQu" },
01419           { "They say that a floating eye can defeat Medusa.", 
01420             "VGhleSBzYXkgdGhhdCBhIGZsb2F0aW5nIGV5ZSBjYW4gZGVmZWF0IE1lZHVzYS4=" },
01421           { "They say that a fortune only has 1 line and you can't read between it.", 
01422             "VGhleSBzYXkgdGhhdCBhIGZvcnR1bmUgb25seSBoYXMgMSBsaW5lIGFuZCB5b3UgY2FuJ3QgcmVhZCBiZXR3ZWVuIGl0Lg==" },
01423           { "They say that a fortune only has 1 line, but you can read between it.", 
01424             "VGhleSBzYXkgdGhhdCBhIGZvcnR1bmUgb25seSBoYXMgMSBsaW5lLCBidXQgeW91IGNhbiByZWFkIGJldHdlZW4gaXQu" },
01425           { "They say that a fountain looks nothing like a regularly erupting geyser.", 
01426             "VGhleSBzYXkgdGhhdCBhIGZvdW50YWluIGxvb2tzIG5vdGhpbmcgbGlrZSBhIHJlZ3VsYXJseSBlcnVwdGluZyBnZXlzZXIu" },
01427           { "They say that a gold doubloon is worth more than its weight in gold.", 
01428             "VGhleSBzYXkgdGhhdCBhIGdvbGQgZG91Ymxvb24gaXMgd29ydGggbW9yZSB0aGFuIGl0cyB3ZWlnaHQgaW4gZ29sZC4=" },
01429           { "They say that a grid bug won't pay a shopkeeper for zapping you in a shop.", 
01430             "VGhleSBzYXkgdGhhdCBhIGdyaWQgYnVnIHdvbid0IHBheSBhIHNob3BrZWVwZXIgZm9yIHphcHBpbmcgeW91IGluIGEgc2hvcC4=" },
01431           { "They say that a gypsy could tell your fortune for a price.", 
01432             "VGhleSBzYXkgdGhhdCBhIGd5cHN5IGNvdWxkIHRlbGwgeW91ciBmb3J0dW5lIGZvciBhIHByaWNlLg==" },
01433           { "They say that a hacker named Alice once level teleported by using a mirror.", 
01434             "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBBbGljZSBvbmNlIGxldmVsIHRlbGVwb3J0ZWQgYnkgdXNpbmcgYSBtaXJyb3Iu" },
01435           { "They say that a hacker named David once slew a giant with a sling and a rock.", 
01436             "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBEYXZpZCBvbmNlIHNsZXcgYSBnaWFudCB3aXRoIGEgc2xpbmcgYW5kIGEgcm9jay4=" },
01437           { "They say that a hacker named Dorothy once rode a fog cloud to Oz.", 
01438             "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBEb3JvdGh5IG9uY2Ugcm9kZSBhIGZvZyBjbG91ZCB0byBPei4=" },
01439           { "They say that a hacker named Mary once lost a white sheep in the mazes.", 
01440             "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBNYXJ5IG9uY2UgbG9zdCBhIHdoaXRlIHNoZWVwIGluIHRoZSBtYXplcy4=" },
01441           { "They say that a helm of brilliance is not to be taken lightly.", 
01442             "VGhleSBzYXkgdGhhdCBhIGhlbG0gb2YgYnJpbGxpYW5jZSBpcyBub3QgdG8gYmUgdGFrZW4gbGlnaHRseS4=" },
01443           { "They say that a hot dog and a hell hound are the same thing.", 
01444             "VGhleSBzYXkgdGhhdCBhIGhvdCBkb2cgYW5kIGEgaGVsbCBob3VuZCBhcmUgdGhlIHNhbWUgdGhpbmcu" },
01445           { "They say that a lamp named Aladdin's Lamp contains a djinni with 3 wishes.", 
01446             "VGhleSBzYXkgdGhhdCBhIGxhbXAgbmFtZWQgQWxhZGRpbidzIExhbXAgY29udGFpbnMgYSBkamlubmkgd2l0aCAzIHdpc2hlcy4=" },
01447           { "They say that a large dog named Lassie will lead you to the amulet.", 
01448             "VGhleSBzYXkgdGhhdCBhIGxhcmdlIGRvZyBuYW1lZCBMYXNzaWUgd2lsbCBsZWFkIHlvdSB0byB0aGUgYW11bGV0Lg==" },
01449           { "They say that a long sword is not a light sword.", 
01450             "VGhleSBzYXkgdGhhdCBhIGxvbmcgc3dvcmQgaXMgbm90IGEgbGlnaHQgc3dvcmQu" },
01451           { "They say that a manes won't mince words with you.", 
01452             "VGhleSBzYXkgdGhhdCBhIG1hbmVzIHdvbid0IG1pbmNlIHdvcmRzIHdpdGggeW91Lg==" },
01453           { "They say that a mind is a terrible thing to waste.", 
01454             "VGhleSBzYXkgdGhhdCBhIG1pbmQgaXMgYSB0ZXJyaWJsZSB0aGluZyB0byB3YXN0ZS4=" },
01455           { "They say that a plain nymph will only wear a wire ring in one ear.", 
01456             "VGhleSBzYXkgdGhhdCBhIHBsYWluIG55bXBoIHdpbGwgb25seSB3ZWFyIGEgd2lyZSByaW5nIGluIG9uZSBlYXIu" },
01457           { "They say that a plumed hat could be a previously used crested helmet.", 
01458             "VGhleSBzYXkgdGhhdCBhIHBsdW1lZCBoYXQgY291bGQgYmUgYSBwcmV2aW91c2x5IHVzZWQgY3Jlc3RlZCBoZWxtZXQu" },
01459           { "They say that a potion of oil is difficult to grasp.", 
01460             "VGhleSBzYXkgdGhhdCBhIHBvdGlvbiBvZiBvaWwgaXMgZGlmZmljdWx0IHRvIGdyYXNwLg==" },
01461           { "They say that a potion of yogurt is a cancelled potion of sickness.", 
01462             "VGhleSBzYXkgdGhhdCBhIHBvdGlvbiBvZiB5b2d1cnQgaXMgYSBjYW5jZWxsZWQgcG90aW9uIG9mIHNpY2tuZXNzLg==" },
01463           { "They say that a purple worm is not a baby purple dragon.", 
01464             "VGhleSBzYXkgdGhhdCBhIHB1cnBsZSB3b3JtIGlzIG5vdCBhIGJhYnkgcHVycGxlIGRyYWdvbi4=" },
01465           { "They say that a quivering blob tastes different than a gelatinous cube.", 
01466             "VGhleSBzYXkgdGhhdCBhIHF1aXZlcmluZyBibG9iIHRhc3RlcyBkaWZmZXJlbnQgdGhhbiBhIGdlbGF0aW5vdXMgY3ViZS4=" },
01467           { "They say that a runed broadsword named Stormbringer attracts vortices.", 
01468             "VGhleSBzYXkgdGhhdCBhIHJ1bmVkIGJyb2Fkc3dvcmQgbmFtZWQgU3Rvcm1icmluZ2VyIGF0dHJhY3RzIHZvcnRpY2VzLg==" },
01469           { "They say that a scroll of summoning has other names.", 
01470             "VGhleSBzYXkgdGhhdCBhIHNjcm9sbCBvZiBzdW1tb25pbmcgaGFzIG90aGVyIG5hbWVzLg==" },
01471           { "They say that a shaman can bestow blessings but usually doesn't.", 
01472             "VGhleSBzYXkgdGhhdCBhIHNoYW1hbiBjYW4gYmVzdG93IGJsZXNzaW5ncyBidXQgdXN1YWxseSBkb2Vzbid0Lg==" },
01473           { "They say that a shaman will bless you for an eye of newt and wing of bat.", 
01474             "VGhleSBzYXkgdGhhdCBhIHNoYW1hbiB3aWxsIGJsZXNzIHlvdSBmb3IgYW4gZXllIG9mIG5ld3QgYW5kIHdpbmcgb2YgYmF0Lg==" },
01475           { "They say that a shimmering gold shield is not a polished silver shield.", 
01476             "VGhleSBzYXkgdGhhdCBhIHNoaW1tZXJpbmcgZ29sZCBzaGllbGQgaXMgbm90IGEgcG9saXNoZWQgc2lsdmVyIHNoaWVsZC4=" },
01477           { "They say that a spear will hit a neo-otyugh. (Do YOU know what that is?)", 
01478             "VGhleSBzYXkgdGhhdCBhIHNwZWFyIHdpbGwgaGl0IGEgbmVvLW90eXVnaC4gKERvIFlPVSBrbm93IHdoYXQgdGhhdCBpcz8p" },
01479           { "They say that a spotted dragon is the ultimate shape changer.", 
01480             "VGhleSBzYXkgdGhhdCBhIHNwb3R0ZWQgZHJhZ29uIGlzIHRoZSB1bHRpbWF0ZSBzaGFwZSBjaGFuZ2VyLg==" },
01481           { "They say that a stethoscope is no good if you can only hear your heartbeat.", 
01482             "VGhleSBzYXkgdGhhdCBhIHN0ZXRob3Njb3BlIGlzIG5vIGdvb2QgaWYgeW91IGNhbiBvbmx5IGhlYXIgeW91ciBoZWFydGJlYXQu" },
01483           { "They say that a succubus named Suzy will sometimes warn you of danger.", 
01484             "VGhleSBzYXkgdGhhdCBhIHN1Y2N1YnVzIG5hbWVkIFN1enkgd2lsbCBzb21ldGltZXMgd2FybiB5b3Ugb2YgZGFuZ2VyLg==" },
01485           { "They say that a wand of cancellation is not like a wand of polymorph.", 
01486             "VGhleSBzYXkgdGhhdCBhIHdhbmQgb2YgY2FuY2VsbGF0aW9uIGlzIG5vdCBsaWtlIGEgd2FuZCBvZiBwb2x5bW9ycGgu" },
01487           { "They say that a wood golem named Pinocchio would be easy to control.", 
01488             "VGhleSBzYXkgdGhhdCBhIHdvb2QgZ29sZW0gbmFtZWQgUGlub2NjaGlvIHdvdWxkIGJlIGVhc3kgdG8gY29udHJvbC4=" },
01489           { "They say that after killing a dragon it's time for a change of scenery.", 
01490             "VGhleSBzYXkgdGhhdCBhZnRlciBraWxsaW5nIGEgZHJhZ29uIGl0J3MgdGltZSBmb3IgYSBjaGFuZ2Ugb2Ygc2NlbmVyeS4=" },
01491           { "They say that an amulet of strangulation is worse than ring around the collar.", 
01492             "VGhleSBzYXkgdGhhdCBhbiBhbXVsZXQgb2Ygc3RyYW5ndWxhdGlvbiBpcyB3b3JzZSB0aGFuIHJpbmcgYXJvdW5kIHRoZSBjb2xsYXIu" },
01493           { "They say that an attic is the best place to hide your toys.", 
01494             "VGhleSBzYXkgdGhhdCBhbiBhdHRpYyBpcyB0aGUgYmVzdCBwbGFjZSB0byBoaWRlIHlvdXIgdG95cy4=" },
01495           { "They say that an axe named Cleaver once belonged to a hacker named Beaver.", 
01496             "VGhleSBzYXkgdGhhdCBhbiBheGUgbmFtZWQgQ2xlYXZlciBvbmNlIGJlbG9uZ2VkIHRvIGEgaGFja2VyIG5hbWVkIEJlYXZlci4=" },
01497           { "They say that an eye of newt and a wing of bat are double the trouble.", 
01498             "VGhleSBzYXkgdGhhdCBhbiBleWUgb2YgbmV3dCBhbmQgYSB3aW5nIG9mIGJhdCBhcmUgZG91YmxlIHRoZSB0cm91YmxlLg==" },
01499           { "They say that an incubus named Izzy sometimes makes women feel sensitive.", 
01500             "VGhleSBzYXkgdGhhdCBhbiBpbmN1YnVzIG5hbWVkIEl6enkgc29tZXRpbWVzIG1ha2VzIHdvbWVuIGZlZWwgc2Vuc2l0aXZlLg==" },
01501           { "They say that an opulent throne room is rarely a place to wish you'd be in.", 
01502             "VGhleSBzYXkgdGhhdCBhbiBvcHVsZW50IHRocm9uZSByb29tIGlzIHJhcmVseSBhIHBsYWNlIHRvIHdpc2ggeW91J2QgYmUgaW4u" },
01503           { "They say that an unlucky hacker once had a nose bleed at an altar and died.", 
01504             "VGhleSBzYXkgdGhhdCBhbiB1bmx1Y2t5IGhhY2tlciBvbmNlIGhhZCBhIG5vc2UgYmxlZWQgYXQgYW4gYWx0YXIgYW5kIGRpZWQu" },
01505           { "They say that and they say this but they never say never, never!", 
01506             "VGhleSBzYXkgdGhhdCBhbmQgdGhleSBzYXkgdGhpcyBidXQgdGhleSBuZXZlciBzYXkgbmV2ZXIsIG5ldmVyIQ==" },
01507           { "They say that any quantum mechanic knows that speed kills.", 
01508             "VGhleSBzYXkgdGhhdCBhbnkgcXVhbnR1bSBtZWNoYW5pYyBrbm93cyB0aGF0IHNwZWVkIGtpbGxzLg==" },
01509           { "They say that applying a unicorn horn means you've missed the point.", 
01510             "VGhleSBzYXkgdGhhdCBhcHBseWluZyBhIHVuaWNvcm4gaG9ybiBtZWFucyB5b3UndmUgbWlzc2VkIHRoZSBwb2ludC4=" },
01511           { "They say that blue stones are radioactive, beware.", 
01512             "VGhleSBzYXkgdGhhdCBibHVlIHN0b25lcyBhcmUgcmFkaW9hY3RpdmUsIGJld2FyZS4=" },
01513           { "They say that building a dungeon is a team effort.", 
01514             "VGhleSBzYXkgdGhhdCBidWlsZGluZyBhIGR1bmdlb24gaXMgYSB0ZWFtIGVmZm9ydC4=" },
01515           { "They say that chaotic characters never get a kick out of altars.", 
01516             "VGhleSBzYXkgdGhhdCBjaGFvdGljIGNoYXJhY3RlcnMgbmV2ZXIgZ2V0IGEga2ljayBvdXQgb2YgYWx0YXJzLg==" },
01517           { "They say that collapsing a dungeon often creates a panic.", 
01518             "VGhleSBzYXkgdGhhdCBjb2xsYXBzaW5nIGEgZHVuZ2VvbiBvZnRlbiBjcmVhdGVzIGEgcGFuaWMu" },
01519           { "They say that counting your eggs before they hatch shows that you care.", 
01520             "VGhleSBzYXkgdGhhdCBjb3VudGluZyB5b3VyIGVnZ3MgYmVmb3JlIHRoZXkgaGF0Y2ggc2hvd3MgdGhhdCB5b3UgY2FyZS4=" },
01521           { "They say that dipping a bag of tricks in a fountain won't make it an icebox.", 
01522             "VGhleSBzYXkgdGhhdCBkaXBwaW5nIGEgYmFnIG9mIHRyaWNrcyBpbiBhIGZvdW50YWluIHdvbid0IG1ha2UgaXQgYW4gaWNlYm94Lg==" },
01523           { "They say that dipping an eel and brown mold in hot water makes bouillabaisse.", 
01524             "VGhleSBzYXkgdGhhdCBkaXBwaW5nIGFuIGVlbCBhbmQgYnJvd24gbW9sZCBpbiBob3Qgd2F0ZXIgbWFrZXMgYm91aWxsYWJhaXNzZS4=" },
01525           { "They say that donating a doubloon is extremely pious charity.", 
01526             "VGhleSBzYXkgdGhhdCBkb25hdGluZyBhIGRvdWJsb29uIGlzIGV4dHJlbWVseSBwaW91cyBjaGFyaXR5Lg==" },
01527           { "They say that eating royal jelly attracts grizzly owlbears.", 
01528             "VGhleSBzYXkgdGhhdCBlYXRpbmcgcm95YWwgamVsbHkgYXR0cmFjdHMgZ3JpenpseSBvd2xiZWFycy4=" },
01529           { "They say that eggs, pancakes and juice are just a mundane breakfast.", 
01530             "VGhleSBzYXkgdGhhdCBlZ2dzLCBwYW5jYWtlcyBhbmQganVpY2UgYXJlIGp1c3QgYSBtdW5kYW5lIGJyZWFrZmFzdC4=" },
01531           { "They say that everyone knows why Medusa stands alone in the dark.", 
01532             "VGhleSBzYXkgdGhhdCBldmVyeW9uZSBrbm93cyB3aHkgTWVkdXNhIHN0YW5kcyBhbG9uZSBpbiB0aGUgZGFyay4=" },
01533           { "They say that everyone wanted rec.games.hack to undergo a name change.", 
01534             "VGhleSBzYXkgdGhhdCBldmVyeW9uZSB3YW50ZWQgcmVjLmdhbWVzLmhhY2sgdG8gdW5kZXJnbyBhIG5hbWUgY2hhbmdlLg==" },
01535           { "They say that finding a winning strategy is a deliberate move on your part.", 
01536             "VGhleSBzYXkgdGhhdCBmaW5kaW5nIGEgd2lubmluZyBzdHJhdGVneSBpcyBhIGRlbGliZXJhdGUgbW92ZSBvbiB5b3VyIHBhcnQu" },
01537           { "They say that finding worthless glass is worth something.", 
01538             "VGhleSBzYXkgdGhhdCBmaW5kaW5nIHdvcnRobGVzcyBnbGFzcyBpcyB3b3J0aCBzb21ldGhpbmcu" },
01539           { "They say that fortune cookies are food for thought.", 
01540             "VGhleSBzYXkgdGhhdCBmb3J0dW5lIGNvb2tpZXMgYXJlIGZvb2QgZm9yIHRob3VnaHQu" },
01541           { "They say that gold is only wasted on a pet dragon.", 
01542             "VGhleSBzYXkgdGhhdCBnb2xkIGlzIG9ubHkgd2FzdGVkIG9uIGEgcGV0IGRyYWdvbi4=" },
01543           { "They say that good things come to those that wait.", 
01544             "VGhleSBzYXkgdGhhdCBnb29kIHRoaW5ncyBjb21lIHRvIHRob3NlIHRoYXQgd2FpdC4=" },
01545           { "They say that greased objects will slip out of monsters' hands.", 
01546             "VGhleSBzYXkgdGhhdCBncmVhc2VkIG9iamVjdHMgd2lsbCBzbGlwIG91dCBvZiBtb25zdGVycycgaGFuZHMu" },
01547           { "They say that if you can't spell then you'll wish you had a spell book.", 
01548             "VGhleSBzYXkgdGhhdCBpZiB5b3UgY2FuJ3Qgc3BlbGwgdGhlbiB5b3UnbGwgd2lzaCB5b3UgaGFkIGEgc3BlbGwgYm9vay4=" },
01549           { "They say that if you live by the sword, you'll die by the sword.", 
01550             "VGhleSBzYXkgdGhhdCBpZiB5b3UgbGl2ZSBieSB0aGUgc3dvcmQsIHlvdSdsbCBkaWUgYnkgdGhlIHN3b3JkLg==" },
01551           { "They say that if you play like a monster you'll have a better game.", 
01552             "VGhleSBzYXkgdGhhdCBpZiB5b3UgcGxheSBsaWtlIGEgbW9uc3RlciB5b3UnbGwgaGF2ZSBhIGJldHRlciBnYW1lLg==" },
01553           { "They say that if you sleep with a demon you might awake with a headache.", 
01554             "VGhleSBzYXkgdGhhdCBpZiB5b3Ugc2xlZXAgd2l0aCBhIGRlbW9uIHlvdSBtaWdodCBhd2FrZSB3aXRoIGEgaGVhZGFjaGUu" },
01555           { "They say that if you step on a crack you could break your mother's back.", 
01556             "VGhleSBzYXkgdGhhdCBpZiB5b3Ugc3RlcCBvbiBhIGNyYWNrIHlvdSBjb3VsZCBicmVhayB5b3VyIG1vdGhlcidzIGJhY2su" },
01557           { "They say that if you're invisible you can still be heard!", 
01558             "VGhleSBzYXkgdGhhdCBpZiB5b3UncmUgaW52aXNpYmxlIHlvdSBjYW4gc3RpbGwgYmUgaGVhcmQh" },
01559           { "They say that if you're lucky you can feel the runes on a scroll.", 
01560             "VGhleSBzYXkgdGhhdCBpZiB5b3UncmUgbHVja3kgeW91IGNhbiBmZWVsIHRoZSBydW5lcyBvbiBhIHNjcm9sbC4=" },
01561           { "They say that in the big picture gold is only small change.", 
01562             "VGhleSBzYXkgdGhhdCBpbiB0aGUgYmlnIHBpY3R1cmUgZ29sZCBpcyBvbmx5IHNtYWxsIGNoYW5nZS4=" },
01563           { "They say that in the dungeon it's not what you know that really matters.", 
01564             "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiBpdCdzIG5vdCB3aGF0IHlvdSBrbm93IHRoYXQgcmVhbGx5IG1hdHRlcnMu" },
01565           { "They say that in the dungeon moon rocks are really dilithium crystals.", 
01566             "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiBtb29uIHJvY2tzIGFyZSByZWFsbHkgZGlsaXRoaXVtIGNyeXN0YWxzLg==" },
01567           { "They say that in the dungeon the boorish customer is never right.", 
01568             "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB0aGUgYm9vcmlzaCBjdXN0b21lciBpcyBuZXZlciByaWdodC4=" },
01569           { "They say that in the dungeon you don't need a watch to tell time.", 
01570             "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3UgZG9uJ3QgbmVlZCBhIHdhdGNoIHRvIHRlbGwgdGltZS4=" },
01571           { "They say that in the dungeon you need something old, new, burrowed and blue.", 
01572             "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3UgbmVlZCBzb21ldGhpbmcgb2xkLCBuZXcsIGJ1cnJvd2VkIGFuZCBibHVlLg==" },
01573           { "They say that in the dungeon you should always count your blessings.", 
01574             "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3Ugc2hvdWxkIGFsd2F5cyBjb3VudCB5b3VyIGJsZXNzaW5ncy4=" },
01575           { "They say that iron golem plate mail isn't worth wishing for.", 
01576             "VGhleSBzYXkgdGhhdCBpcm9uIGdvbGVtIHBsYXRlIG1haWwgaXNuJ3Qgd29ydGggd2lzaGluZyBmb3Iu" },
01577           { "They say that it takes four quarterstaffs to make one staff.", 
01578             "VGhleSBzYXkgdGhhdCBpdCB0YWtlcyBmb3VyIHF1YXJ0ZXJzdGFmZnMgdG8gbWFrZSBvbmUgc3RhZmYu" },
01579           { "They say that it's not over till the fat ladies sing.", 
01580             "VGhleSBzYXkgdGhhdCBpdCdzIG5vdCBvdmVyIHRpbGwgdGhlIGZhdCBsYWRpZXMgc2luZy4=" },
01581           { "They say that it's not over till the fat lady shouts `Off with its head'.", 
01582             "VGhleSBzYXkgdGhhdCBpdCdzIG5vdCBvdmVyIHRpbGwgdGhlIGZhdCBsYWR5IHNob3V0cyBgT2ZmIHdpdGggaXRzIGhlYWQnLg==" },
01583           { "They say that kicking a heavy statue is really a dumb move.", 
01584             "VGhleSBzYXkgdGhhdCBraWNraW5nIGEgaGVhdnkgc3RhdHVlIGlzIHJlYWxseSBhIGR1bWIgbW92ZS4=" },
01585           { "They say that kicking a valuable gem doesn't seem to make sense.", 
01586             "VGhleSBzYXkgdGhhdCBraWNraW5nIGEgdmFsdWFibGUgZ2VtIGRvZXNuJ3Qgc2VlbSB0byBtYWtlIHNlbnNlLg==" },
01587           { "They say that leprechauns know Latin and you should too.", 
01588             "VGhleSBzYXkgdGhhdCBsZXByZWNoYXVucyBrbm93IExhdGluIGFuZCB5b3Ugc2hvdWxkIHRvby4=" },
01589           { "They say that minotaurs get lost outside of the mazes.", 
01590             "VGhleSBzYXkgdGhhdCBtaW5vdGF1cnMgZ2V0IGxvc3Qgb3V0c2lkZSBvZiB0aGUgbWF6ZXMu" },
01591           { "They say that most trolls are born again.", 
01592             "VGhleSBzYXkgdGhhdCBtb3N0IHRyb2xscyBhcmUgYm9ybiBhZ2Fpbi4=" },
01593           { "They say that naming your cat Garfield will make you more attractive.", 
01594             "VGhleSBzYXkgdGhhdCBuYW1pbmcgeW91ciBjYXQgR2FyZmllbGQgd2lsbCBtYWtlIHlvdSBtb3JlIGF0dHJhY3RpdmUu" },
01595           { "They say that no one knows everything about everything in the dungeon.", 
01596             "VGhleSBzYXkgdGhhdCBubyBvbmUga25vd3MgZXZlcnl0aGluZyBhYm91dCBldmVyeXRoaW5nIGluIHRoZSBkdW5nZW9uLg==" },
01597           { "They say that no one plays NetHack just for the fun of it.", 
01598             "VGhleSBzYXkgdGhhdCBubyBvbmUgcGxheXMgTmV0SGFjayBqdXN0IGZvciB0aGUgZnVuIG9mIGl0Lg==" },
01599           { "They say that no one really subscribes to rec.games.roguelike.nethack.", 
01600             "VGhleSBzYXkgdGhhdCBubyBvbmUgcmVhbGx5IHN1YnNjcmliZXMgdG8gcmVjLmdhbWVzLnJvZ3VlbGlrZS5uZXRoYWNrLg==" },
01601           { "They say that no one will admit to starting a rumor.", 
01602             "VGhleSBzYXkgdGhhdCBubyBvbmUgd2lsbCBhZG1pdCB0byBzdGFydGluZyBhIHJ1bW9yLg==" },
01603           { "They say that nurses sometimes carry scalpels and never use them.", 
01604             "VGhleSBzYXkgdGhhdCBudXJzZXMgc29tZXRpbWVzIGNhcnJ5IHNjYWxwZWxzIGFuZCBuZXZlciB1c2UgdGhlbS4=" },
01605           { "They say that once you've met one wizard you've met them all.", 
01606             "VGhleSBzYXkgdGhhdCBvbmNlIHlvdSd2ZSBtZXQgb25lIHdpemFyZCB5b3UndmUgbWV0IHRoZW0gYWxsLg==" },
01607           { "They say that one troll is worth 10,000 newts.", 
01608             "VGhleSBzYXkgdGhhdCBvbmUgdHJvbGwgaXMgd29ydGggMTAsMDAwIG5ld3RzLg==" },
01609           { "They say that only David can find the zoo!", 
01610             "VGhleSBzYXkgdGhhdCBvbmx5IERhdmlkIGNhbiBmaW5kIHRoZSB6b28h" },
01611           { "They say that only angels play their harps for their pets.", 
01612             "VGhleSBzYXkgdGhhdCBvbmx5IGFuZ2VscyBwbGF5IHRoZWlyIGhhcnBzIGZvciB0aGVpciBwZXRzLg==" },
01613           { "They say that only big spenders carry gold.", 
01614             "VGhleSBzYXkgdGhhdCBvbmx5IGJpZyBzcGVuZGVycyBjYXJyeSBnb2xkLg==" },
01615           { "They say that orc shamans are healthy, wealthy and wise.", 
01616             "VGhleSBzYXkgdGhhdCBvcmMgc2hhbWFucyBhcmUgaGVhbHRoeSwgd2VhbHRoeSBhbmQgd2lzZS4=" },
01617           { "They say that playing NetHack is like walking into a death trap.", 
01618             "VGhleSBzYXkgdGhhdCBwbGF5aW5nIE5ldEhhY2sgaXMgbGlrZSB3YWxraW5nIGludG8gYSBkZWF0aCB0cmFwLg==" },
01619           { "They say that problem breathing is best treated by a proper diet.", 
01620             "VGhleSBzYXkgdGhhdCBwcm9ibGVtIGJyZWF0aGluZyBpcyBiZXN0IHRyZWF0ZWQgYnkgYSBwcm9wZXIgZGlldC4=" },
01621           { "They say that quaffing many potions of levitation can give you a headache.", 
01622             "VGhleSBzYXkgdGhhdCBxdWFmZmluZyBtYW55IHBvdGlvbnMgb2YgbGV2aXRhdGlvbiBjYW4gZ2l2ZSB5b3UgYSBoZWFkYWNoZS4=" },
01623           { "They say that queen bees get that way by eating royal jelly.", 
01624             "VGhleSBzYXkgdGhhdCBxdWVlbiBiZWVzIGdldCB0aGF0IHdheSBieSBlYXRpbmcgcm95YWwgamVsbHku" },
01625           { "They say that reading a scare monster scroll is the same as saying Elbereth.", 
01626             "VGhleSBzYXkgdGhhdCByZWFkaW5nIGEgc2NhcmUgbW9uc3RlciBzY3JvbGwgaXMgdGhlIHNhbWUgYXMgc2F5aW5nIEVsYmVyZXRoLg==" },
01627           { "They say that real hackers always are controlled.", 
01628             "VGhleSBzYXkgdGhhdCByZWFsIGhhY2tlcnMgYWx3YXlzIGFyZSBjb250cm9sbGVkLg==" },
01629           { "They say that real hackers never sleep.", 
01630             "VGhleSBzYXkgdGhhdCByZWFsIGhhY2tlcnMgbmV2ZXIgc2xlZXAu" },
01631           { "They say that shopkeepers are insured by Croesus himself!", 
01632             "VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBhcmUgaW5zdXJlZCBieSBDcm9lc3VzIGhpbXNlbGYh" },
01633           { "They say that shopkeepers never carry more than 20 gold pieces, at night.", 
01634             "VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBuZXZlciBjYXJyeSBtb3JlIHRoYW4gMjAgZ29sZCBwaWVjZXMsIGF0IG5pZ2h0Lg==" },
01635           { "They say that shopkeepers never sell blessed potions of invisibility.", 
01636             "VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBuZXZlciBzZWxsIGJsZXNzZWQgcG90aW9ucyBvZiBpbnZpc2liaWxpdHku" },
01637           { "They say that soldiers wear kid gloves and silly helmets.", 
01638             "VGhleSBzYXkgdGhhdCBzb2xkaWVycyB3ZWFyIGtpZCBnbG92ZXMgYW5kIHNpbGx5IGhlbG1ldHMu" },
01639           { "They say that some Kops are on the take.", 
01640             "VGhleSBzYXkgdGhhdCBzb21lIEtvcHMgYXJlIG9uIHRoZSB0YWtlLg==" },
01641           { "They say that some guards' palms can be greased.", 
01642             "VGhleSBzYXkgdGhhdCBzb21lIGd1YXJkcycgcGFsbXMgY2FuIGJlIGdyZWFzZWQu" },
01643           { "They say that some monsters may kiss your boots to stop your drum playing.", 
01644             "VGhleSBzYXkgdGhhdCBzb21lIG1vbnN0ZXJzIG1heSBraXNzIHlvdXIgYm9vdHMgdG8gc3RvcCB5b3VyIGRydW0gcGxheWluZy4=" },
01645           { "They say that sometimes you can be the hit of the party when playing a horn.", 
01646             "VGhleSBzYXkgdGhhdCBzb21ldGltZXMgeW91IGNhbiBiZSB0aGUgaGl0IG9mIHRoZSBwYXJ0eSB3aGVuIHBsYXlpbmcgYSBob3JuLg==" },
01647           { "They say that the NetHack gods generally welcome your sacrifices.", 
01648             "VGhleSBzYXkgdGhhdCB0aGUgTmV0SGFjayBnb2RzIGdlbmVyYWxseSB3ZWxjb21lIHlvdXIgc2FjcmlmaWNlcy4=" },
01649           { "They say that the Three Rings are named Vilya, Nenya and Narya.", 
01650             "VGhleSBzYXkgdGhhdCB0aGUgVGhyZWUgUmluZ3MgYXJlIG5hbWVkIFZpbHlhLCBOZW55YSBhbmQgTmFyeWEu" },
01651           { "They say that the Wizard of Yendor has a death wish.", 
01652             "VGhleSBzYXkgdGhhdCB0aGUgV2l6YXJkIG9mIFllbmRvciBoYXMgYSBkZWF0aCB3aXNoLg==" },
01653           { "They say that the `hair of the dog' is sometimes an effective remedy.", 
01654             "VGhleSBzYXkgdGhhdCB0aGUgYGhhaXIgb2YgdGhlIGRvZycgaXMgc29tZXRpbWVzIGFuIGVmZmVjdGl2ZSByZW1lZHku" },
01655           { "They say that the best time to save your game is now before its too late.", 
01656             "VGhleSBzYXkgdGhhdCB0aGUgYmVzdCB0aW1lIHRvIHNhdmUgeW91ciBnYW1lIGlzIG5vdyBiZWZvcmUgaXRzIHRvbyBsYXRlLg==" },
01657           { "They say that the biggest obstacle in NetHack is your mind.", 
01658             "VGhleSBzYXkgdGhhdCB0aGUgYmlnZ2VzdCBvYnN0YWNsZSBpbiBOZXRIYWNrIGlzIHlvdXIgbWluZC4=" },
01659           { "They say that the gods are angry when they hit you with objects.", 
01660             "VGhleSBzYXkgdGhhdCB0aGUgZ29kcyBhcmUgYW5ncnkgd2hlbiB0aGV5IGhpdCB5b3Ugd2l0aCBvYmplY3RzLg==" },
01661           { "They say that the priesthood are specially favored by the gods.", 
01662             "VGhleSBzYXkgdGhhdCB0aGUgcHJpZXN0aG9vZCBhcmUgc3BlY2lhbGx5IGZhdm9yZWQgYnkgdGhlIGdvZHMu" },
01663           { "They say that the way to make a unicorn happy is to give it what it wants.", 
01664             "VGhleSBzYXkgdGhhdCB0aGUgd2F5IHRvIG1ha2UgYSB1bmljb3JuIGhhcHB5IGlzIHRvIGdpdmUgaXQgd2hhdCBpdCB3YW50cy4=" },
01665           { "They say that there are no black or white stones, only gray.", 
01666             "VGhleSBzYXkgdGhhdCB0aGVyZSBhcmUgbm8gYmxhY2sgb3Igd2hpdGUgc3RvbmVzLCBvbmx5IGdyYXku" },
01667           { "They say that there are no skeletons hence there are no skeleton keys.", 
01668             "VGhleSBzYXkgdGhhdCB0aGVyZSBhcmUgbm8gc2tlbGV0b25zIGhlbmNlIHRoZXJlIGFyZSBubyBza2VsZXRvbiBrZXlzLg==" },
01669           { "They say that there is a clever rogue in every hacker just dying to escape.", 
01670             "VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBhIGNsZXZlciByb2d1ZSBpbiBldmVyeSBoYWNrZXIganVzdCBkeWluZyB0byBlc2NhcGUu" },
01671           { "They say that there is no such thing as free advice.", 
01672             "VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBubyBzdWNoIHRoaW5nIGFzIGZyZWUgYWR2aWNlLg==" },
01673           { "They say that there is only one way to win at NetHack.", 
01674             "VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBvbmx5IG9uZSB3YXkgdG8gd2luIGF0IE5ldEhhY2su" },
01675           { "They say that there once was a fearsome chaotic samurai named Luk No.", 
01676             "VGhleSBzYXkgdGhhdCB0aGVyZSBvbmNlIHdhcyBhIGZlYXJzb21lIGNoYW90aWMgc2FtdXJhaSBuYW1lZCBMdWsgTm8u" },
01677           { "They say that there was a time when cursed holy water wasn't water.", 
01678             "VGhleSBzYXkgdGhhdCB0aGVyZSB3YXMgYSB0aW1lIHdoZW4gY3Vyc2VkIGhvbHkgd2F0ZXIgd2Fzbid0IHdhdGVyLg==" },
01679           { "They say that there's no point in crying over a gray ooze.", 
01680             "VGhleSBzYXkgdGhhdCB0aGVyZSdzIG5vIHBvaW50IGluIGNyeWluZyBvdmVyIGEgZ3JheSBvb3plLg==" },
01681           { "They say that there's only hope left after you've opened Pandora's box.", 
01682             "VGhleSBzYXkgdGhhdCB0aGVyZSdzIG9ubHkgaG9wZSBsZWZ0IGFmdGVyIHlvdSd2ZSBvcGVuZWQgUGFuZG9yYSdzIGJveC4=" },
01683           { "They say that trapdoors should always be marked `Caution: Trap Door'.", 
01684             "VGhleSBzYXkgdGhhdCB0cmFwZG9vcnMgc2hvdWxkIGFsd2F5cyBiZSBtYXJrZWQgYENhdXRpb246IFRyYXAgRG9vcicu" },
01685           { "They say that using an amulet of change isn't a difficult operation.", 
01686             "VGhleSBzYXkgdGhhdCB1c2luZyBhbiBhbXVsZXQgb2YgY2hhbmdlIGlzbid0IGEgZGlmZmljdWx0IG9wZXJhdGlvbi4=" },
01687           { "They say that water walking boots are better if you are fast like Hermes.", 
01688             "VGhleSBzYXkgdGhhdCB3YXRlciB3YWxraW5nIGJvb3RzIGFyZSBiZXR0ZXIgaWYgeW91IGFyZSBmYXN0IGxpa2UgSGVybWVzLg==" },
01689           { "They say that when you wear a circular amulet you might resemble a troll.", 
01690             "VGhleSBzYXkgdGhhdCB3aGVuIHlvdSB3ZWFyIGEgY2lyY3VsYXIgYW11bGV0IHlvdSBtaWdodCByZXNlbWJsZSBhIHRyb2xsLg==" },
01691           { "They say that when you're hungry you can get a pizza in 30 moves or it's free.", 
01692             "VGhleSBzYXkgdGhhdCB3aGVuIHlvdSdyZSBodW5ncnkgeW91IGNhbiBnZXQgYSBwaXp6YSBpbiAzMCBtb3ZlcyBvciBpdCdzIGZyZWUu" },
01693           { "They say that when your god is angry you should try another one.", 
01694             "VGhleSBzYXkgdGhhdCB3aGVuIHlvdXIgZ29kIGlzIGFuZ3J5IHlvdSBzaG91bGQgdHJ5IGFub3RoZXIgb25lLg==" },
01695           { "They say that wielding a unicorn horn takes strength.", 
01696             "VGhleSBzYXkgdGhhdCB3aWVsZGluZyBhIHVuaWNvcm4gaG9ybiB0YWtlcyBzdHJlbmd0aC4=" },
01697           { "They say that with speed boots you never worry about hit and run accidents.", 
01698             "VGhleSBzYXkgdGhhdCB3aXRoIHNwZWVkIGJvb3RzIHlvdSBuZXZlciB3b3JyeSBhYm91dCBoaXQgYW5kIHJ1biBhY2NpZGVudHMu" },
01699           { "They say that you can defeat a killer bee with a unicorn horn.", 
01700             "VGhleSBzYXkgdGhhdCB5b3UgY2FuIGRlZmVhdCBhIGtpbGxlciBiZWUgd2l0aCBhIHVuaWNvcm4gaG9ybi4=" },
01701           { "They say that you can only cross the River Styx in Charon's boat.", 
01702             "VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkgY3Jvc3MgdGhlIFJpdmVyIFN0eXggaW4gQ2hhcm9uJ3MgYm9hdC4=" },
01703           { "They say that you can only kill a lich once and then you'd better be careful.", 
01704             "VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkga2lsbCBhIGxpY2ggb25jZSBhbmQgdGhlbiB5b3UnZCBiZXR0ZXIgYmUgY2FyZWZ1bC4=" },
01705           { "They say that you can only wish for things you've already had.", 
01706             "VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkgd2lzaCBmb3IgdGhpbmdzIHlvdSd2ZSBhbHJlYWR5IGhhZC4=" },
01707           { "They say that you can train a cat by talking gently to it.", 
01708             "VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRyYWluIGEgY2F0IGJ5IHRhbGtpbmcgZ2VudGx5IHRvIGl0Lg==" },
01709           { "They say that you can train a dog by talking firmly to it.", 
01710             "VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRyYWluIGEgZG9nIGJ5IHRhbGtpbmcgZmlybWx5IHRvIGl0Lg==" },
01711           { "They say that you can trust your gold with the king.", 
01712             "VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRydXN0IHlvdXIgZ29sZCB3aXRoIHRoZSBraW5nLg==" },
01713           { "They say that you can't wipe your greasy bare hands on a blank scroll.", 
01714             "VGhleSBzYXkgdGhhdCB5b3UgY2FuJ3Qgd2lwZSB5b3VyIGdyZWFzeSBiYXJlIGhhbmRzIG9uIGEgYmxhbmsgc2Nyb2xsLg==" },
01715           { "They say that you cannot trust scrolls of rumor.", 
01716             "VGhleSBzYXkgdGhhdCB5b3UgY2Fubm90IHRydXN0IHNjcm9sbHMgb2YgcnVtb3Iu" },
01717           { "They say that you could fall head over heels for an energy vortex.", 
01718             "VGhleSBzYXkgdGhhdCB5b3UgY291bGQgZmFsbCBoZWFkIG92ZXIgaGVlbHMgZm9yIGFuIGVuZXJneSB2b3J0ZXgu" },
01719           { "They say that you need a key in order to open locked doors.", 
01720             "VGhleSBzYXkgdGhhdCB5b3UgbmVlZCBhIGtleSBpbiBvcmRlciB0byBvcGVuIGxvY2tlZCBkb29ycy4=" },
01721           { "They say that you need a mirror to notice a mimic in an antique shop.", 
01722             "VGhleSBzYXkgdGhhdCB5b3UgbmVlZCBhIG1pcnJvciB0byBub3RpY2UgYSBtaW1pYyBpbiBhbiBhbnRpcXVlIHNob3Au" },
01723           { "They say that you really can use a pick-axe unless you really can't.", 
01724             "VGhleSBzYXkgdGhhdCB5b3UgcmVhbGx5IGNhbiB1c2UgYSBwaWNrLWF4ZSB1bmxlc3MgeW91IHJlYWxseSBjYW4ndC4=" },
01725           { "They say that you should always store your tools in the cellar.", 
01726             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGFsd2F5cyBzdG9yZSB5b3VyIHRvb2xzIGluIHRoZSBjZWxsYXIu" },
01727           { "They say that you should be careful while climbing the ladder to success.", 
01728             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGJlIGNhcmVmdWwgd2hpbGUgY2xpbWJpbmcgdGhlIGxhZGRlciB0byBzdWNjZXNzLg==" },
01729           { "They say that you should call your armor `rustproof'.", 
01730             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGNhbGwgeW91ciBhcm1vciBgcnVzdHByb29mJy4=" },
01731           { "They say that you should name your dog Spuds to have a cool pet.", 
01732             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5hbWUgeW91ciBkb2cgU3B1ZHMgdG8gaGF2ZSBhIGNvb2wgcGV0Lg==" },
01733           { "They say that you should name your weapon after your first monster kill.", 
01734             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5hbWUgeW91ciB3ZWFwb24gYWZ0ZXIgeW91ciBmaXJzdCBtb25zdGVyIGtpbGwu" },
01735           { "They say that you should never introduce a rope golem to a succubus.", 
01736             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIGludHJvZHVjZSBhIHJvcGUgZ29sZW0gdG8gYSBzdWNjdWJ1cy4=" },
01737           { "They say that you should never sleep near invisible ring wraiths.", 
01738             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIHNsZWVwIG5lYXIgaW52aXNpYmxlIHJpbmcgd3JhaXRocy4=" },
01739           { "They say that you should never try to leave the dungeon with a bag of gems.", 
01740             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIHRyeSB0byBsZWF2ZSB0aGUgZHVuZ2VvbiB3aXRoIGEgYmFnIG9mIGdlbXMu" },
01741           { "They say that you should remove your armor before sitting on a throne.", 
01742             "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIHJlbW92ZSB5b3VyIGFybW9yIGJlZm9yZSBzaXR0aW5nIG9uIGEgdGhyb25lLg==" },
01743           { "This fortune cookie is copy protected.", 
01744             "VGhpcyBmb3J0dW5lIGNvb2tpZSBpcyBjb3B5IHByb3RlY3RlZC4=" },
01745           { "This fortune cookie is the property of Fortune Cookies, Inc.", 
01746             "VGhpcyBmb3J0dW5lIGNvb2tpZSBpcyB0aGUgcHJvcGVydHkgb2YgRm9ydHVuZSBDb29raWVzLCBJbmMu" },
01747           { "Tired? Try a scroll of charging on yourself.", 
01748             "VGlyZWQ/IFRyeSBhIHNjcm9sbCBvZiBjaGFyZ2luZyBvbiB5b3Vyc2VsZi4=" },
01749           { "To achieve the next higher rating, you need 3 more points.", 
01750             "VG8gYWNoaWV2ZSB0aGUgbmV4dCBoaWdoZXIgcmF0aW5nLCB5b3UgbmVlZCAzIG1vcmUgcG9pbnRzLg==" },
01751           { "To reach heaven, escape the dungeon while wearing a ring of levitation.", 
01752             "VG8gcmVhY2ggaGVhdmVuLCBlc2NhcGUgdGhlIGR1bmdlb24gd2hpbGUgd2VhcmluZyBhIHJpbmcgb2YgbGV2aXRhdGlvbi4=" },
01753           { "Tourists wear shirts loud enough to wake the dead.", 
01754             "VG91cmlzdHMgd2VhciBzaGlydHMgbG91ZCBlbm91Z2ggdG8gd2FrZSB0aGUgZGVhZC4=" },
01755           { "Try calling your katana Moulinette.", 
01756             "VHJ5IGNhbGxpbmcgeW91ciBrYXRhbmEgTW91bGluZXR0ZS4=" },
01757           { "Ulch! That meat was painted!", 
01758             "VWxjaCEgVGhhdCBtZWF0IHdhcyBwYWludGVkIQ==" },
01759           { "Unfortunately, this message was left intentionally blank.", 
01760             "VW5mb3J0dW5hdGVseSwgdGhpcyBtZXNzYWdlIHdhcyBsZWZ0IGludGVudGlvbmFsbHkgYmxhbmsu" },
01761           { "Using a morning star in the evening has no effect.", 
01762             "VXNpbmcgYSBtb3JuaW5nIHN0YXIgaW4gdGhlIGV2ZW5pbmcgaGFzIG5vIGVmZmVjdC4=" },
01763           { "Want a hint? Zap a wand of make invisible on your weapon!", 
01764             "V2FudCBhIGhpbnQ/IFphcCBhIHdhbmQgb2YgbWFrZSBpbnZpc2libGUgb24geW91ciB3ZWFwb24h" },
01765           { "Want to ascend in a hurry? Apply at Gizmonic Institute.", 
01766             "V2FudCB0byBhc2NlbmQgaW4gYSBodXJyeT8gQXBwbHkgYXQgR2l6bW9uaWMgSW5zdGl0dXRlLg==" },
01767           { "Wanted: shopkeepers. Send a scroll of mail to Mage of Yendor/Level 35/Dungeon.", 
01768             "V2FudGVkOiBzaG9wa2VlcGVycy4gU2VuZCBhIHNjcm9sbCBvZiBtYWlsIHRvIE1hZ2Ugb2YgWWVuZG9yL0xldmVsIDM1L0R1bmdlb24u" },
01769           { "Warning: fortune reading can be hazardous to your health.", 
01770             "V2FybmluZzogZm9ydHVuZSByZWFkaW5nIGNhbiBiZSBoYXphcmRvdXMgdG8geW91ciBoZWFsdGgu" },
01771           { "We have new ways of detecting treachery...", 
01772             "V2UgaGF2ZSBuZXcgd2F5cyBvZiBkZXRlY3RpbmcgdHJlYWNoZXJ5Li4u" },
01773           { "Wet towels make great weapons!", 
01774             "V2V0IHRvd2VscyBtYWtlIGdyZWF0IHdlYXBvbnMh" },
01775           { "What a pity, you cannot read it!", 
01776             "V2hhdCBhIHBpdHksIHlvdSBjYW5ub3QgcmVhZCBpdCE=" },
01777           { "When a piercer drops in on you, you will be tempted to hit the ceiling!", 
01778             "V2hlbiBhIHBpZXJjZXIgZHJvcHMgaW4gb24geW91LCB5b3Ugd2lsbCBiZSB0ZW1wdGVkIHRvIGhpdCB0aGUgY2VpbGluZyE=" },
01779           { "When in a maze follow the right wall and you will never get lost.", 
01780             "V2hlbiBpbiBhIG1hemUgZm9sbG93IHRoZSByaWdodCB3YWxsIGFuZCB5b3Ugd2lsbCBuZXZlciBnZXQgbG9zdC4=" },
01781           { "When you have a key, you don't have to wait for the guard.", 
01782             "V2hlbiB5b3UgaGF2ZSBhIGtleSwgeW91IGRvbid0IGhhdmUgdG8gd2FpdCBmb3IgdGhlIGd1YXJkLg==" },
01783           { "Why are you wasting time reading fortunes?", 
01784             "V2h5IGFyZSB5b3Ugd2FzdGluZyB0aW1lIHJlYWRpbmcgZm9ydHVuZXM/" },
01785           { "Wish for a master key and open the Magic Memory Vault!", 
01786             "V2lzaCBmb3IgYSBtYXN0ZXIga2V5IGFuZCBvcGVuIHRoZSBNYWdpYyBNZW1vcnkgVmF1bHQh" },
01787           { "Wizard expects every monster to do its duty.", 
01788             "V2l6YXJkIGV4cGVjdHMgZXZlcnkgbW9uc3RlciB0byBkbyBpdHMgZHV0eS4=" },
01789           { "Wow! You could've had a potion of fruit juice!", 
01790             "V293ISBZb3UgY291bGQndmUgaGFkIGEgcG90aW9uIG9mIGZydWl0IGp1aWNlIQ==" },
01791           { "Yet Another Silly Message (YASM).", 
01792             "WWV0IEFub3RoZXIgU2lsbHkgTWVzc2FnZSAoWUFTTSku" },
01793           { "You are destined to be misled by a fortune.", 
01794             "WW91IGFyZSBkZXN0aW5lZCB0byBiZSBtaXNsZWQgYnkgYSBmb3J0dW5lLg==" },
01795           { "You can get a genuine Amulet of Yendor by doing the following: --More--", 
01796             "WW91IGNhbiBnZXQgYSBnZW51aW5lIEFtdWxldCBvZiBZZW5kb3IgYnkgZG9pbmcgdGhlIGZvbGxvd2luZzogLS1Nb3JlLS0=" },
01797           { "You can protect yourself from black dragons by doing the following: --More--", 
01798             "WW91IGNhbiBwcm90ZWN0IHlvdXJzZWxmIGZyb20gYmxhY2sgZHJhZ29ucyBieSBkb2luZyB0aGUgZm9sbG93aW5nOiAtLU1vcmUtLQ==" },
01799           { "You can't get by the snake.", 
01800             "WW91IGNhbid0IGdldCBieSB0aGUgc25ha2Uu" },
01801           { "You feel like someone is pulling your leg.", 
01802             "WW91IGZlZWwgbGlrZSBzb21lb25lIGlzIHB1bGxpbmcgeW91ciBsZWcu" },
01803           { "You have to outwit the Sphynx or pay her.", 
01804             "WW91IGhhdmUgdG8gb3V0d2l0IHRoZSBTcGh5bnggb3IgcGF5IGhlci4=" },
01805           { "You hear the fortune cookie's hissing!", 
01806             "WW91IGhlYXIgdGhlIGZvcnR1bmUgY29va2llJ3MgaGlzc2luZyE=" },
01807           { "You may get rich selling letters, but beware of being blackmailed!", 
01808             "WW91IG1heSBnZXQgcmljaCBzZWxsaW5nIGxldHRlcnMsIGJ1dCBiZXdhcmUgb2YgYmVpbmcgYmxhY2ttYWlsZWQh" },
01809           { "You offend Shai-Hulud by sheathing your crysknife without having drawn blood.", 
01810             "WW91IG9mZmVuZCBTaGFpLUh1bHVkIGJ5IHNoZWF0aGluZyB5b3VyIGNyeXNrbmlmZSB3aXRob3V0IGhhdmluZyBkcmF3biBibG9vZC4=" },
01811           { "You swallowed the fortune!", 
01812             "WW91IHN3YWxsb3dlZCB0aGUgZm9ydHVuZSE=" },
01813           { "You want to regain strength? Two levels ahead is a guesthouse!", 
01814             "WW91IHdhbnQgdG8gcmVnYWluIHN0cmVuZ3RoPyBUd28gbGV2ZWxzIGFoZWFkIGlzIGEgZ3Vlc3Rob3VzZSE=" },
01815           { "You will encounter a tall, dark, and gruesome creature...", 
01816             "WW91IHdpbGwgZW5jb3VudGVyIGEgdGFsbCwgZGFyaywgYW5kIGdydWVzb21lIGNyZWF0dXJlLi4u" },
01817 
01818           { "The End", "VGhlIEVuZA==" }
01819       };
01820 
01821 /* PL_Base64Encode, random strings */
01822 PRBool test_004(void)
01823 {
01824     int i;
01825     char result[ 4096 ];
01826 
01827     printf("Test 004 (PL_Base64Encode, random strings)                            ..."); fflush(stdout);
01828 
01829     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
01830     {
01831         PRUint32 plen = PL_strlen(array[i].plaintext);
01832         PRUint32 clen = ((plen + 2)/3)*4;
01833 
01834         char *rv = PL_Base64Encode(array[i].plaintext, plen, result);
01835 
01836         if( rv != result )
01837         {
01838             printf("FAIL\n\t(%d): return value\n", i);
01839             return PR_FALSE;
01840         }
01841 
01842         if( 0 != PL_strncmp(result, array[i].cyphertext, clen) )
01843         {
01844             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", 
01845                    i, array[i].plaintext, array[i].cyphertext, clen, result);
01846             return PR_FALSE;
01847         }
01848     }
01849 
01850     printf("PASS\n");
01851     return PR_TRUE;
01852 }
01853 
01854 /* PL_Base64Encode, single characters, malloc */
01855 PRBool test_005(void)
01856 {
01857     PRUint32 a, b;
01858     unsigned char plain[ 4 ];
01859     unsigned char cypher[ 5 ];
01860     char *rv;
01861 
01862     printf("Test 005 (PL_Base64Encode, single characters, malloc)                 ..."); fflush(stdout);
01863 
01864     plain[1] = plain[2] = plain[3] = (unsigned char)0;
01865     cypher[2] = cypher[3] = (unsigned char)'=';
01866     cypher[4] = (unsigned char)0;
01867 
01868     for( a = 0; a < 64; a++ )
01869     {
01870         cypher[0] = base[a];
01871 
01872         for( b = 0; b < 4; b++ )
01873         {
01874             plain[0] = (unsigned char)(a * 4 + b);
01875             cypher[1] = base[(b * 16)];
01876 
01877             rv = PL_Base64Encode((char *)plain, 1, (char *)0);
01878             if( (char *)0 == rv )
01879             {
01880                 printf("FAIL\n\t(%d, %d): no return value\n", a, b);
01881                 return PR_FALSE;
01882             }
01883 
01884             if( 0 != PL_strcmp((char *)cypher, rv) )
01885             {
01886                 printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%s.\"\n",
01887                        a, b, cypher, rv);
01888                 PR_DELETE(rv);
01889                 return PR_FALSE;
01890             }
01891 
01892             PR_DELETE(rv);
01893         }
01894     }
01895 
01896     printf("PASS\n");
01897     return PR_TRUE;
01898 }
01899 
01900 /* PL_Base64Encode, double characters, malloc */
01901 PRBool test_006(void)
01902 {
01903     PRUint32 a, b, c, d;
01904     unsigned char plain[ 4 ];
01905     unsigned char cypher[ 5 ];
01906     char *rv;
01907 
01908     printf("Test 006 (PL_Base64Encode, double characters, malloc)                 ..."); fflush(stdout);
01909 
01910     plain[2] = plain[3] = (unsigned char)0;
01911     cypher[3] = (unsigned char)'=';
01912     cypher[4] = (unsigned char)0;
01913 
01914     for( a = 0; a < 64; a++ )
01915     {
01916         cypher[0] = base[a];
01917         for( b = 0; b < 4; b++ )
01918         {
01919             plain[0] = (a*4) + b;
01920             for( c = 0; c < 16; c++ )
01921             {
01922                 cypher[1] = base[b*16 + c];
01923                 for( d = 0; d < 16; d++ )
01924                 {
01925                     plain[1] = c*16 + d;
01926                     cypher[2] = base[d*4];
01927 
01928                     rv = PL_Base64Encode((char *)plain, 2, (char *)0);
01929                     if( (char *)0 == rv )
01930                     {
01931                         printf("FAIL\n\t(%d, %d, %d, %d): no return value\n", a, b, c, d);
01932                         return PR_FALSE;
01933                     }
01934 
01935                     if( 0 != PL_strcmp((char *)cypher, rv) )
01936                     {
01937                         printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%s.\"\n",
01938                                a, b, c, d, cypher, rv);
01939                         PR_DELETE(rv);
01940                         return PR_FALSE;
01941                     }
01942 
01943                     PR_DELETE(rv);
01944                 }
01945             }
01946         }
01947     }
01948 
01949     printf("PASS\n");
01950     return PR_TRUE;
01951 }
01952 
01953 /* PL_Base64Encode, triple characters, malloc */
01954 PRBool test_007(void)
01955 {
01956     PRUint32 a, b, c, d, e, f;
01957     unsigned char plain[ 4 ];
01958     unsigned char cypher[ 5 ];
01959     char *rv;
01960 
01961     printf("Test 007 (PL_Base64Encode, triple characters, malloc)                 ..."); fflush(stdout);
01962 
01963     cypher[4] = (unsigned char)0;
01964 
01965     for( a = 0; a < 64; a++ )
01966     {
01967         cypher[0] = base[a];
01968         for( b = 0; b < 4; b++ )
01969         {
01970             plain[0] = (a*4) + b;
01971             for( c = 0; c < 16; c++ )
01972             {
01973                 cypher[1] = base[b*16 + c];
01974                 for( d = 0; d < 16; d++ )
01975                 {
01976                     plain[1] = c*16 + d;
01977                     for( e = 0; e < 4; e++ )
01978                     {
01979                         cypher[2] = base[d*4 + e];
01980                         for( f = 0; f < 64; f++ )
01981                         {
01982                             plain[2] = e * 64 + f;
01983                             cypher[3] = base[f];
01984 
01985                             rv = PL_Base64Encode((char *)plain, 3, (char *)0);
01986                             if( (char *)0 == rv )
01987                             {
01988                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): no return value\n", a, b, c, d, e, f);
01989                                 return PR_FALSE;
01990                             }
01991 
01992                             if( 0 != PL_strcmp((char *)cypher, rv) )
01993                             {
01994                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.4s.\"\n",
01995                                        a, b, c, d, e, f, cypher, rv);
01996                                 PR_DELETE(rv);
01997                                 return PR_FALSE;
01998                             }
01999 
02000                             PR_DELETE(rv);
02001                         }
02002                     }
02003                 }
02004             }
02005         }
02006     }
02007 
02008     printf("PASS\n");
02009     return PR_TRUE;
02010 }
02011 
02012 /* PL_Base64Encode, random strings, malloc */
02013 PRBool test_008(void)
02014 {
02015     int i;
02016 
02017     printf("Test 008 (PL_Base64Encode, random strings, malloc)                    ..."); fflush(stdout);
02018 
02019     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02020     {
02021         PRUint32 plen = PL_strlen(array[i].plaintext);
02022         PRUint32 clen = ((plen + 2)/3)*4;
02023 
02024         char *rv = PL_Base64Encode(array[i].plaintext, plen, (char *)0);
02025 
02026         if( (char *)0 == rv )
02027         {
02028             printf("FAIL\n\t(%d): no return value\n", i);
02029             return PR_FALSE;
02030         }
02031 
02032         if( 0 != PL_strcmp(rv, array[i].cyphertext) )
02033         {
02034             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", 
02035                    i, array[i].plaintext, array[i].cyphertext, rv);
02036             return PR_FALSE;
02037         }
02038     }
02039 
02040     printf("PASS\n");
02041     return PR_TRUE;
02042 }
02043 
02044 /* PL_Base64Decode, single characters */
02045 PRBool test_009(void)
02046 {
02047     PRUint32 a, b;
02048     unsigned char plain[ 4 ];
02049     unsigned char cypher[ 5 ];
02050     char result[ 8 ];
02051     char *rv;
02052 
02053     printf("Test 009 (PL_Base64Decode, single characters, equals)                 ..."); fflush(stdout);
02054 
02055     plain[1] = plain[2] = plain[3] = (unsigned char)0;
02056     cypher[2] = cypher[3] = (unsigned char)'=';
02057     cypher[4] = (unsigned char)0;
02058 
02059     for( a = 0; a < 64; a++ )
02060     {
02061         cypher[0] = base[a];
02062 
02063         for( b = 0; b < 4; b++ )
02064         {
02065             plain[0] = (unsigned char)(a * 4 + b);
02066             cypher[1] = base[(b * 16)];
02067 
02068             rv = PL_Base64Decode((char *)cypher, 4, result);
02069             if( rv != result )
02070             {
02071                 printf("FAIL\n\t(%d, %d): return value\n", a, b);
02072                 return PR_FALSE;
02073             }
02074 
02075             if( 0 != PL_strncmp((char *)plain, result, 1) )
02076             {
02077                 printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%.1s.\"\n",
02078                        a, b, plain, result);
02079                 return PR_FALSE;
02080             }
02081         }
02082     }
02083 
02084     printf("PASS\n");
02085     return PR_TRUE;
02086 }
02087 
02088 /* PL_Base64Decode, single characters */
02089 PRBool test_010(void)
02090 {
02091     PRUint32 a, b;
02092     unsigned char plain[ 4 ];
02093     unsigned char cypher[ 5 ];
02094     char result[ 8 ];
02095     char *rv;
02096 
02097     printf("Test 010 (PL_Base64Decode, single characters, no equals)              ..."); fflush(stdout);
02098 
02099     plain[1] = plain[2] = plain[3] = (unsigned char)0;
02100     cypher[2] = cypher[3] = (unsigned char)0;
02101     cypher[4] = (unsigned char)0;
02102 
02103     for( a = 0; a < 64; a++ )
02104     {
02105         cypher[0] = base[a];
02106 
02107         for( b = 0; b < 4; b++ )
02108         {
02109             plain[0] = (unsigned char)(a * 4 + b);
02110             cypher[1] = base[(b * 16)];
02111 
02112             rv = PL_Base64Decode((char *)cypher, 2, result);
02113             if( rv != result )
02114             {
02115                 printf("FAIL\n\t(%d, %d): return value\n", a, b);
02116                 return PR_FALSE;
02117             }
02118 
02119             if( 0 != PL_strncmp((char *)plain, result, 1) )
02120             {
02121                 printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%.1s.\"\n",
02122                        a, b, plain, result);
02123                 return PR_FALSE;
02124             }
02125         }
02126     }
02127 
02128     printf("PASS\n");
02129     return PR_TRUE;
02130 }
02131 
02132 /* PL_Base64Decode, double characters */
02133 PRBool test_011(void)
02134 {
02135     PRUint32 a, b, c, d;
02136     unsigned char plain[ 4 ];
02137     unsigned char cypher[ 5 ];
02138     char result[ 8 ];
02139     char *rv;
02140 
02141     printf("Test 011 (PL_Base64Decode, double characters, equals)                 ..."); fflush(stdout);
02142 
02143     plain[2] = plain[3] = (unsigned char)0;
02144     cypher[3] = (unsigned char)'=';
02145     cypher[4] = (unsigned char)0;
02146 
02147     for( a = 0; a < 64; a++ )
02148     {
02149         cypher[0] = base[a];
02150         for( b = 0; b < 4; b++ )
02151         {
02152             plain[0] = (a*4) + b;
02153             for( c = 0; c < 16; c++ )
02154             {
02155                 cypher[1] = base[b*16 + c];
02156                 for( d = 0; d < 16; d++ )
02157                 {
02158                     plain[1] = c*16 + d;
02159                     cypher[2] = base[d*4];
02160 
02161                     rv = PL_Base64Decode((char *)cypher, 4, result);
02162                     if( rv != result )
02163                     {
02164                         printf("FAIL\n\t(%d, %d, %d, %d): return value\n", a, b, c, d);
02165                         return PR_FALSE;
02166                     }
02167 
02168                     if( 0 != PL_strncmp((char *)plain, result, 2) )
02169                     {
02170                         printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%.2s.\"\n",
02171                                a, b, c, d, plain, result);
02172                         return PR_FALSE;
02173                     }
02174                 }
02175             }
02176         }
02177     }
02178 
02179     printf("PASS\n");
02180     return PR_TRUE;
02181 }
02182 
02183 /* PL_Base64Decode, double characters */
02184 PRBool test_012(void)
02185 {
02186     PRUint32 a, b, c, d;
02187     unsigned char plain[ 4 ];
02188     unsigned char cypher[ 5 ];
02189     char result[ 8 ];
02190     char *rv;
02191 
02192     printf("Test 012 (PL_Base64Decode, double characters, no equals)              ..."); fflush(stdout);
02193 
02194     plain[2] = plain[3] = (unsigned char)0;
02195     cypher[3] = (unsigned char)0;
02196     cypher[4] = (unsigned char)0;
02197 
02198     for( a = 0; a < 64; a++ )
02199     {
02200         cypher[0] = base[a];
02201         for( b = 0; b < 4; b++ )
02202         {
02203             plain[0] = (a*4) + b;
02204             for( c = 0; c < 16; c++ )
02205             {
02206                 cypher[1] = base[b*16 + c];
02207                 for( d = 0; d < 16; d++ )
02208                 {
02209                     plain[1] = c*16 + d;
02210                     cypher[2] = base[d*4];
02211 
02212                     rv = PL_Base64Decode((char *)cypher, 3, result);
02213                     if( rv != result )
02214                     {
02215                         printf("FAIL\n\t(%d, %d, %d, %d): return value\n", a, b, c, d);
02216                         return PR_FALSE;
02217                     }
02218 
02219                     if( 0 != PL_strncmp((char *)plain, result, 2) )
02220                     {
02221                         printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%.2s.\"\n",
02222                                a, b, c, d, cypher, result);
02223                         return PR_FALSE;
02224                     }
02225                 }
02226             }
02227         }
02228     }
02229 
02230     printf("PASS\n");
02231     return PR_TRUE;
02232 }
02233 
02234 /* PL_Base64Decode, triple characters */
02235 PRBool test_013(void)
02236 {
02237     PRUint32 a, b, c, d, e, f;
02238     unsigned char plain[ 4 ];
02239     unsigned char cypher[ 5 ];
02240     char result[ 8 ];
02241     char *rv;
02242 
02243     printf("Test 013 (PL_Base64Decode, triple characters)                         ..."); fflush(stdout);
02244 
02245     cypher[4] = (unsigned char)0;
02246 
02247     for( a = 0; a < 64; a++ )
02248     {
02249         cypher[0] = base[a];
02250         for( b = 0; b < 4; b++ )
02251         {
02252             plain[0] = (a*4) + b;
02253             for( c = 0; c < 16; c++ )
02254             {
02255                 cypher[1] = base[b*16 + c];
02256                 for( d = 0; d < 16; d++ )
02257                 {
02258                     plain[1] = c*16 + d;
02259                     for( e = 0; e < 4; e++ )
02260                     {
02261                         cypher[2] = base[d*4 + e];
02262                         for( f = 0; f < 64; f++ )
02263                         {
02264                             plain[2] = e * 64 + f;
02265                             cypher[3] = base[f];
02266 
02267                             rv = PL_Base64Decode((char *)cypher, 4, result);
02268                             if( rv != result )
02269                             {
02270                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): return value\n", a, b, c, d, e, f);
02271                                 return PR_FALSE;
02272                             }
02273 
02274                             if( 0 != PL_strncmp((char *)plain, result, 3) )
02275                             {
02276                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.3s.\"\n",
02277                                        a, b, c, d, e, f, plain, result);
02278                                 return PR_FALSE;
02279                             }
02280                         }
02281                     }
02282                 }
02283             }
02284         }
02285     }
02286 
02287     printf("PASS\n");
02288     return PR_TRUE;
02289 }
02290 
02291 /* PL_Base64Decode, random strings */
02292 PRBool test_014(void)
02293 {
02294     int i;
02295     char result[ 4096 ];
02296 
02297     printf("Test 014 (PL_Base64Decode, random strings, equals)                    ..."); fflush(stdout);
02298 
02299     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02300     {
02301         PRUint32 clen = PL_strlen(array[i].cyphertext);
02302         PRUint32 plen = (clen * 3) / 4;
02303 
02304         char *rv = PL_Base64Decode(array[i].cyphertext, clen, result);
02305 
02306         if( rv != result )
02307         {
02308             printf("FAIL\n\t(%d): return value\n", i);
02309             return PR_FALSE;
02310         }
02311 
02312         if( 0 == (clen & 3) )
02313         {
02314             if( '=' == array[i].cyphertext[clen-1] )
02315             {
02316                 if( '=' == array[i].cyphertext[clen-2] )
02317                 {
02318                     plen -= 2;
02319                 }
02320                 else
02321                 {
02322                     plen -= 1;
02323                 }
02324             }
02325         }
02326 
02327         if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
02328         {
02329             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", 
02330                    i, array[i].cyphertext, array[i].plaintext, plen, result);
02331             return PR_FALSE;
02332         }
02333     }
02334 
02335     printf("PASS\n");
02336     return PR_TRUE;
02337 }
02338 
02339 /* PL_Base64Decode, random strings */
02340 PRBool test_015(void)
02341 {
02342     int i;
02343     char buffer[ 4096 ];
02344     char result[ 4096 ];
02345     char *rv;
02346 
02347     printf("Test 015 (PL_Base64Decode, random strings, no equals)                 ..."); fflush(stdout);
02348 
02349     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02350     {
02351         PRUint32 clen, plen;
02352 
02353         PL_strcpy(buffer, array[i].cyphertext);
02354         clen = PL_strlen(buffer);
02355 
02356         if( 0 == (clen & 3) )
02357         {
02358             if( '=' == buffer[clen-1] )
02359             {
02360                 if( '=' == buffer[clen-2] )
02361                 {
02362                     buffer[clen-2] = buffer[clen-1] = (char)0;
02363                     clen -= 2;
02364                 }
02365                 else
02366                 {
02367                     buffer[clen-1] = (char)0;
02368                     clen -= 1;
02369                 }
02370             }
02371         }
02372 
02373         plen = (clen * 3) / 4;
02374 
02375         rv = PL_Base64Decode(buffer, clen, result);
02376 
02377         if( rv != result )
02378         {
02379             printf("FAIL\n\t(%d): return value\n", i);
02380             return PR_FALSE;
02381         }
02382 
02383         if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
02384         {
02385             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", 
02386                    i, array[i].cyphertext, array[i].plaintext, plen, result);
02387             return PR_FALSE;
02388         }
02389     }
02390 
02391     printf("PASS\n");
02392     return PR_TRUE;
02393 }
02394 
02395 /* PL_Base64Decode, single characters, malloc */
02396 PRBool test_016(void)
02397 {
02398     PRUint32 a, b;
02399     unsigned char plain[ 4 ];
02400     unsigned char cypher[ 5 ];
02401     char *rv;
02402 
02403     printf("Test 016 (PL_Base64Decode, single characters, equals, malloc)         ..."); fflush(stdout);
02404 
02405     plain[1] = plain[2] = plain[3] = (unsigned char)0;
02406     cypher[2] = cypher[3] = (unsigned char)'=';
02407     cypher[4] = (unsigned char)0;
02408 
02409     for( a = 0; a < 64; a++ )
02410     {
02411         cypher[0] = base[a];
02412 
02413         for( b = 0; b < 4; b++ )
02414         {
02415             plain[0] = (unsigned char)(a * 4 + b);
02416             cypher[1] = base[(b * 16)];
02417 
02418             rv = PL_Base64Decode((char *)cypher, 4, (char *)0);
02419             if( (char *)0 == rv )
02420             {
02421                 printf("FAIL\n\t(%d, %d): no return value\n", a, b);
02422                 return PR_FALSE;
02423             }
02424 
02425             if( 0 != PL_strcmp((char *)plain, rv) )
02426             {
02427                 printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%s.\"\n",
02428                        a, b, plain, rv);
02429                 PR_DELETE(rv);
02430                 return PR_FALSE;
02431             }
02432 
02433             PR_DELETE(rv);
02434         }
02435     }
02436 
02437     printf("PASS\n");
02438     return PR_TRUE;
02439 }
02440 
02441 /* PL_Base64Decode, single characters, malloc */
02442 PRBool test_017(void)
02443 {
02444     PRUint32 a, b;
02445     unsigned char plain[ 4 ];
02446     unsigned char cypher[ 5 ];
02447     char *rv;
02448 
02449     printf("Test 017 (PL_Base64Decode, single characters, no equals, malloc)      ..."); fflush(stdout);
02450 
02451     plain[1] = plain[2] = plain[3] = (unsigned char)0;
02452     cypher[2] = cypher[3] = (unsigned char)0;
02453     cypher[4] = (unsigned char)0;
02454 
02455     for( a = 0; a < 64; a++ )
02456     {
02457         cypher[0] = base[a];
02458 
02459         for( b = 0; b < 4; b++ )
02460         {
02461             plain[0] = (unsigned char)(a * 4 + b);
02462             cypher[1] = base[(b * 16)];
02463 
02464             rv = PL_Base64Decode((char *)cypher, 2, (char *)0);
02465             if( (char *)0 == rv )
02466             {
02467                 printf("FAIL\n\t(%d, %d): no return value\n", a, b);
02468                 return PR_FALSE;
02469             }
02470 
02471             if( 0 != PL_strcmp((char *)plain, rv) )
02472             {
02473                 printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%s.\"\n",
02474                        a, b, plain, rv);
02475                 PR_DELETE(rv);
02476                 return PR_FALSE;
02477             }
02478 
02479             PR_DELETE(rv);
02480         }
02481     }
02482 
02483     printf("PASS\n");
02484     return PR_TRUE;
02485 }
02486 
02487 /* PL_Base64Decode, double characters, malloc */
02488 PRBool test_018(void)
02489 {
02490     PRUint32 a, b, c, d;
02491     unsigned char plain[ 4 ];
02492     unsigned char cypher[ 5 ];
02493     char *rv;
02494 
02495     printf("Test 018 (PL_Base64Decode, double characters, equals, malloc)         ..."); fflush(stdout);
02496 
02497     plain[2] = plain[3] = (unsigned char)0;
02498     cypher[3] = (unsigned char)'=';
02499     cypher[4] = (unsigned char)0;
02500 
02501     for( a = 0; a < 64; a++ )
02502     {
02503         cypher[0] = base[a];
02504         for( b = 0; b < 4; b++ )
02505         {
02506             plain[0] = (a*4) + b;
02507             for( c = 0; c < 16; c++ )
02508             {
02509                 cypher[1] = base[b*16 + c];
02510                 for( d = 0; d < 16; d++ )
02511                 {
02512                     plain[1] = c*16 + d;
02513                     cypher[2] = base[d*4];
02514 
02515                     rv = PL_Base64Decode((char *)cypher, 4, (char *)0);
02516                     if( (char *)0 == rv )
02517                     {
02518                         printf("FAIL\n\t(%d, %d, %d, %d): no return value\n", a, b, c, d);
02519                         return PR_FALSE;
02520                     }
02521 
02522                     if( 0 != PL_strcmp((char *)plain, rv) )
02523                     {
02524                         printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%s.\"\n",
02525                                a, b, c, d, plain, rv);
02526                         PR_DELETE(rv);
02527                         return PR_FALSE;
02528                     }
02529 
02530                     PR_DELETE(rv);
02531                 }
02532             }
02533         }
02534     }
02535 
02536     printf("PASS\n");
02537     return PR_TRUE;
02538 }
02539 
02540 /* PL_Base64Decode, double characters, malloc */
02541 PRBool test_019(void)
02542 {
02543     PRUint32 a, b, c, d;
02544     unsigned char plain[ 4 ];
02545     unsigned char cypher[ 5 ];
02546     char *rv;
02547 
02548     printf("Test 019 (PL_Base64Decode, double characters, no equals, malloc)      ..."); fflush(stdout);
02549 
02550     plain[2] = plain[3] = (unsigned char)0;
02551     cypher[3] = (unsigned char)0;
02552     cypher[4] = (unsigned char)0;
02553 
02554     for( a = 0; a < 64; a++ )
02555     {
02556         cypher[0] = base[a];
02557         for( b = 0; b < 4; b++ )
02558         {
02559             plain[0] = (a*4) + b;
02560             for( c = 0; c < 16; c++ )
02561             {
02562                 cypher[1] = base[b*16 + c];
02563                 for( d = 0; d < 16; d++ )
02564                 {
02565                     plain[1] = c*16 + d;
02566                     cypher[2] = base[d*4];
02567 
02568                     rv = PL_Base64Decode((char *)cypher, 3, (char *)0);
02569                     if( (char *)0 == rv )
02570                     {
02571                         printf("FAIL\n\t(%d, %d, %d, %d): no return value\n", a, b, c, d);
02572                         return PR_FALSE;
02573                     }
02574 
02575                     if( 0 != PL_strcmp((char *)plain, rv) )
02576                     {
02577                         printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%s.\"\n",
02578                                a, b, c, d, cypher, rv);
02579                         PR_DELETE(rv);
02580                         return PR_FALSE;
02581                     }
02582 
02583                     PR_DELETE(rv);
02584                 }
02585             }
02586         }
02587     }
02588 
02589     printf("PASS\n");
02590     return PR_TRUE;
02591 }
02592 
02593 /* PL_Base64Decode, triple characters, malloc */
02594 PRBool test_020(void)
02595 {
02596     PRUint32 a, b, c, d, e, f;
02597     unsigned char plain[ 4 ];
02598     unsigned char cypher[ 5 ];
02599     char *rv;
02600 
02601     printf("Test 020 (PL_Base64Decode, triple characters, malloc)                 ..."); fflush(stdout);
02602 
02603     cypher[4] = (unsigned char)0;
02604     plain[3] = (unsigned char)0;
02605 
02606     for( a = 0; a < 64; a++ )
02607     {
02608         cypher[0] = base[a];
02609         for( b = 0; b < 4; b++ )
02610         {
02611             plain[0] = (a*4) + b;
02612             for( c = 0; c < 16; c++ )
02613             {
02614                 cypher[1] = base[b*16 + c];
02615                 for( d = 0; d < 16; d++ )
02616                 {
02617                     plain[1] = c*16 + d;
02618                     for( e = 0; e < 4; e++ )
02619                     {
02620                         cypher[2] = base[d*4 + e];
02621                         for( f = 0; f < 64; f++ )
02622                         {
02623                             plain[2] = e * 64 + f;
02624                             cypher[3] = base[f];
02625 
02626                             rv = PL_Base64Decode((char *)cypher, 4, (char *)0);
02627                             if( (char *)0 == rv )
02628                             {
02629                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): no return value\n", a, b, c, d, e, f);
02630                                 return PR_FALSE;
02631                             }
02632 
02633                             if( 0 != PL_strcmp((char *)plain, rv) )
02634                             {
02635                                 printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.3s.\"\n",
02636                                        a, b, c, d, e, f, plain, rv);
02637                                 PR_DELETE(rv);
02638                                 return PR_FALSE;
02639                             }
02640 
02641                             PR_DELETE(rv);
02642                         }
02643                     }
02644                 }
02645             }
02646         }
02647     }
02648 
02649     printf("PASS\n");
02650     return PR_TRUE;
02651 }
02652 
02653 /* PL_Base64Decode, random strings, malloc */
02654 PRBool test_021(void)
02655 {
02656     int i;
02657 
02658     printf("Test 021 (PL_Base64Decode, random strings, equals, malloc)            ..."); fflush(stdout);
02659 
02660     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02661     {
02662         PRUint32 clen = PL_strlen(array[i].cyphertext);
02663 
02664         char *rv = PL_Base64Decode(array[i].cyphertext, clen, (char *)0);
02665 
02666         if( (char *)0 == rv )
02667         {
02668             printf("FAIL\n\t(%d): no return value\n", i);
02669             return PR_FALSE;
02670         }
02671 
02672         if( 0 != PL_strcmp(rv, array[i].plaintext) )
02673         {
02674             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", 
02675                    i, array[i].cyphertext, array[i].plaintext, rv);
02676             PR_DELETE(rv);
02677             return PR_FALSE;
02678         }
02679 
02680         PR_DELETE(rv);
02681     }
02682 
02683     printf("PASS\n");
02684     return PR_TRUE;
02685 }
02686 
02687 /* PL_Base64Encode, random strings, malloc */
02688 PRBool test_022(void)
02689 {
02690     int i;
02691     char buffer[ 4096 ];
02692     char *rv;
02693 
02694     printf("Test 022 (PL_Base64Decode, random strings, no equals, malloc)         ..."); fflush(stdout);
02695 
02696     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02697     {
02698         PRUint32 clen;
02699 
02700         PL_strcpy(buffer, array[i].cyphertext);
02701         clen = PL_strlen(buffer);
02702 
02703         if( 0 == (clen & 3) )
02704         {
02705             if( '=' == buffer[clen-1] )
02706             {
02707                 if( '=' == buffer[clen-2] )
02708                 {
02709                     buffer[clen-2] = buffer[clen-1] = (char)0;
02710                     clen -= 2;
02711                 }
02712                 else
02713                 {
02714                     buffer[clen-1] = (char)0;
02715                     clen -= 1;
02716                 }
02717             }
02718         }
02719 
02720         rv = PL_Base64Decode(buffer, clen, (char *)0);
02721 
02722         if( (char *)0 == rv )
02723         {
02724             printf("FAIL\n\t(%d): no return value\n", i);
02725             return PR_FALSE;
02726         }
02727 
02728         if( 0 != PL_strcmp(rv, array[i].plaintext) )
02729         {
02730             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", 
02731                    i, array[i].cyphertext, array[i].plaintext, rv);
02732             return PR_FALSE;
02733         }
02734     }
02735 
02736     printf("PASS\n");
02737     return PR_TRUE;
02738 }
02739 
02740 /* PL_Base64Encode, random strings */
02741 PRBool test_023(void)
02742 {
02743     int i;
02744     char result[ 4096 ];
02745 
02746     printf("Test 023 (PL_Base64Encode, random strings, strlen)                    ..."); fflush(stdout);
02747 
02748     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02749     {
02750         PRUint32 plen = PL_strlen(array[i].plaintext);
02751         PRUint32 clen = ((plen + 2)/3)*4;
02752 
02753         char *rv = PL_Base64Encode(array[i].plaintext, 0, result);
02754 
02755         if( rv != result )
02756         {
02757             printf("FAIL\n\t(%d): return value\n", i);
02758             return PR_FALSE;
02759         }
02760 
02761         if( 0 != PL_strncmp(result, array[i].cyphertext, clen) )
02762         {
02763             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", 
02764                    i, array[i].plaintext, array[i].cyphertext, clen, result);
02765             return PR_FALSE;
02766         }
02767     }
02768 
02769     printf("PASS\n");
02770     return PR_TRUE;
02771 }
02772 
02773 /* PL_Base64Encode, random strings, malloc */
02774 PRBool test_024(void)
02775 {
02776     int i;
02777 
02778     printf("Test 024 (PL_Base64Encode, random strings, malloc, strlen)            ..."); fflush(stdout);
02779 
02780     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02781     {
02782         PRUint32 plen = PL_strlen(array[i].plaintext);
02783         PRUint32 clen = ((plen + 2)/3)*4;
02784 
02785         char *rv = PL_Base64Encode(array[i].plaintext, 0, (char *)0);
02786 
02787         if( (char *)0 == rv )
02788         {
02789             printf("FAIL\n\t(%d): no return value\n", i);
02790             return PR_FALSE;
02791         }
02792 
02793         if( 0 != PL_strcmp(rv, array[i].cyphertext) )
02794         {
02795             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", 
02796                    i, array[i].plaintext, array[i].cyphertext, rv);
02797             return PR_FALSE;
02798         }
02799     }
02800 
02801     printf("PASS\n");
02802     return PR_TRUE;
02803 }
02804 
02805 /* PL_Base64Decode, random strings */
02806 PRBool test_025(void)
02807 {
02808     int i;
02809     char result[ 4096 ];
02810 
02811     printf("Test 025 (PL_Base64Decode, random strings, equals, strlen)            ..."); fflush(stdout);
02812 
02813     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02814     {
02815         PRUint32 clen = PL_strlen(array[i].cyphertext);
02816         PRUint32 plen = (clen * 3) / 4;
02817 
02818         char *rv = PL_Base64Decode(array[i].cyphertext, 0, result);
02819 
02820         if( rv != result )
02821         {
02822             printf("FAIL\n\t(%d): return value\n", i);
02823             return PR_FALSE;
02824         }
02825 
02826         if( 0 == (clen & 3) )
02827         {
02828             if( '=' == array[i].cyphertext[clen-1] )
02829             {
02830                 if( '=' == array[i].cyphertext[clen-2] )
02831                 {
02832                     plen -= 2;
02833                 }
02834                 else
02835                 {
02836                     plen -= 1;
02837                 }
02838             }
02839         }
02840 
02841         if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
02842         {
02843             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", 
02844                    i, array[i].cyphertext, array[i].plaintext, plen, result);
02845             return PR_FALSE;
02846         }
02847     }
02848 
02849     printf("PASS\n");
02850     return PR_TRUE;
02851 }
02852 
02853 /* PL_Base64Decode, random strings */
02854 PRBool test_026(void)
02855 {
02856     int i;
02857     char buffer[ 4096 ];
02858     char result[ 4096 ];
02859     char *rv;
02860 
02861     printf("Test 026 (PL_Base64Decode, random strings, no equals, strlen)         ..."); fflush(stdout);
02862 
02863     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02864     {
02865         PRUint32 clen, plen;
02866 
02867         PL_strcpy(buffer, array[i].cyphertext);
02868         clen = PL_strlen(buffer);
02869 
02870         if( 0 == (clen & 3) )
02871         {
02872             if( '=' == buffer[clen-1] )
02873             {
02874                 if( '=' == buffer[clen-2] )
02875                 {
02876                     buffer[clen-2] = buffer[clen-1] = (char)0;
02877                     clen -= 2;
02878                 }
02879                 else
02880                 {
02881                     buffer[clen-1] = (char)0;
02882                     clen -= 1;
02883                 }
02884             }
02885         }
02886 
02887         plen = (clen * 3) / 4;
02888 
02889         rv = PL_Base64Decode(buffer, 0, result);
02890 
02891         if( rv != result )
02892         {
02893             printf("FAIL\n\t(%d): return value\n", i);
02894             return PR_FALSE;
02895         }
02896 
02897         if( 0 != PL_strncmp(result, array[i].plaintext, plen) )
02898         {
02899             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", 
02900                    i, array[i].cyphertext, array[i].plaintext, plen, result);
02901             return PR_FALSE;
02902         }
02903     }
02904 
02905     printf("PASS\n");
02906     return PR_TRUE;
02907 }
02908 
02909 /* PL_Base64Decode, random strings, malloc */
02910 PRBool test_027(void)
02911 {
02912     int i;
02913 
02914     printf("Test 027 (PL_Base64Decode, random strings, equals, malloc, strlen)    ..."); fflush(stdout);
02915 
02916     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02917     {
02918         PRUint32 clen = PL_strlen(array[i].cyphertext);
02919 
02920         char *rv = PL_Base64Decode(array[i].cyphertext, 0, (char *)0);
02921 
02922         if( (char *)0 == rv )
02923         {
02924             printf("FAIL\n\t(%d): no return value\n", i);
02925             return PR_FALSE;
02926         }
02927 
02928         if( 0 != PL_strcmp(rv, array[i].plaintext) )
02929         {
02930             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", 
02931                    i, array[i].cyphertext, array[i].plaintext, rv);
02932             PR_DELETE(rv);
02933             return PR_FALSE;
02934         }
02935 
02936         PR_DELETE(rv);
02937     }
02938 
02939     printf("PASS\n");
02940     return PR_TRUE;
02941 }
02942 
02943 /* PL_Base64Encode, random strings, malloc */
02944 PRBool test_028(void)
02945 {
02946     int i;
02947     char buffer[ 4096 ];
02948     char *rv;
02949 
02950     printf("Test 028 (PL_Base64Decode, random strings, no equals, malloc, strlen) ..."); fflush(stdout);
02951 
02952     for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
02953     {
02954         PRUint32 clen;
02955 
02956         PL_strcpy(buffer, array[i].cyphertext);
02957         clen = PL_strlen(buffer);
02958 
02959         if( 0 == (clen & 3) )
02960         {
02961             if( '=' == buffer[clen-1] )
02962             {
02963                 if( '=' == buffer[clen-2] )
02964                 {
02965                     buffer[clen-2] = buffer[clen-1] = (char)0;
02966                     clen -= 2;
02967                 }
02968                 else
02969                 {
02970                     buffer[clen-1] = (char)0;
02971                     clen -= 1;
02972                 }
02973             }
02974         }
02975 
02976         rv = PL_Base64Decode(buffer, 0, (char *)0);
02977 
02978         if( (char *)0 == rv )
02979         {
02980             printf("FAIL\n\t(%d): no return value\n", i);
02981             return PR_FALSE;
02982         }
02983 
02984         if( 0 != PL_strcmp(rv, array[i].plaintext) )
02985         {
02986             printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", 
02987                    i, array[i].cyphertext, array[i].plaintext, rv);
02988             return PR_FALSE;
02989         }
02990     }
02991 
02992     printf("PASS\n");
02993     return PR_TRUE;
02994 }
02995 
02996 int
02997 main
02998 (
02999     int     argc,
03000     char   *argv[]
03001 )
03002 {
03003     printf("Testing the Portable Library base64 functions:\n");
03004     printf("(warning: the \"triple characters\" tests are slow)\n");
03005 
03006     if( 1
03007         && test_001()
03008         && test_002()
03009         && test_003()
03010         && test_004()
03011         && test_005()
03012         && test_006()
03013         && test_007()
03014         && test_008()
03015         && test_009()
03016         && test_010()
03017         && test_011()
03018         && test_012()
03019         && test_013()
03020         && test_014()
03021         && test_015()
03022         && test_016()
03023         && test_017()
03024         && test_018()
03025         && test_019()
03026         && test_020()
03027         && test_021()
03028         && test_022()
03029         && test_023()
03030         && test_024()
03031         && test_025()
03032         && test_026()
03033         && test_027()
03034         && test_028()
03035       )
03036     {
03037         printf("Suite passed.\n");
03038         return 0;
03039     }
03040     else
03041     {
03042         printf("Suite failed.\n");
03043         return 1;
03044     }
03045 
03046     /*NOTREACHED*/
03047 }