michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "plbase64.h" michael@0: #include "plstr.h" michael@0: #include "nspr.h" michael@0: michael@0: #include michael@0: michael@0: static unsigned char *base = (unsigned char *)"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; michael@0: michael@0: /* PL_Base64Encode, single characters */ michael@0: PRBool test_001(void) michael@0: { michael@0: PRUint32 a, b; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 001 (PL_Base64Encode, single characters) ..."); fflush(stdout); michael@0: michael@0: plain[1] = plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[2] = cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (unsigned char)(a * 4 + b); michael@0: cypher[1] = base[(b * 16)]; michael@0: michael@0: rv = PL_Base64Encode((char *)plain, 1, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): return value\n", a, b); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)cypher, result, 4) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%.4s.\"\n", michael@0: a, b, cypher, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, double characters */ michael@0: PRBool test_002(void) michael@0: { michael@0: PRUint32 a, b, c, d; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 002 (PL_Base64Encode, double characters) ..."); fflush(stdout); michael@0: michael@0: plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: cypher[2] = base[d*4]; michael@0: michael@0: rv = PL_Base64Encode((char *)plain, 2, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): return value\n", a, b, c, d); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)cypher, result, 4) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%.4s.\"\n", michael@0: a, b, c, d, cypher, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, triple characters */ michael@0: PRBool test_003(void) michael@0: { michael@0: PRUint32 a, b, c, d, e, f; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 003 (PL_Base64Encode, triple characters) ..."); fflush(stdout); michael@0: michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: for( e = 0; e < 4; e++ ) michael@0: { michael@0: cypher[2] = base[d*4 + e]; michael@0: for( f = 0; f < 64; f++ ) michael@0: { michael@0: plain[2] = e * 64 + f; michael@0: cypher[3] = base[f]; michael@0: michael@0: rv = PL_Base64Encode((char *)plain, 3, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): return value\n", a, b, c, d, e, f); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)cypher, result, 4) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.4s.\"\n", michael@0: a, b, c, d, e, f, cypher, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: static struct michael@0: { michael@0: const char *plaintext; michael@0: const char *cyphertext; michael@0: } array[] = michael@0: { michael@0: /* Cyphertexts generated with uuenview 0.5.13 */ michael@0: { " ", "IA==" }, michael@0: { ".", "Lg==" }, michael@0: { "/", "Lw==" }, michael@0: { "C", "Qw==" }, michael@0: { "H", "SA==" }, michael@0: { "S", "Uw==" }, michael@0: { "^", "Xg==" }, michael@0: { "a", "YQ==" }, michael@0: { "o", "bw==" }, michael@0: { "t", "dA==" }, michael@0: michael@0: { "AB", "QUI=" }, michael@0: { "AH", "QUg=" }, michael@0: { "AQ", "QVE=" }, michael@0: { "BD", "QkQ=" }, michael@0: { "CR", "Q1I=" }, michael@0: { "CS", "Q1M=" }, michael@0: { "DB", "REI=" }, michael@0: { "DC", "REM=" }, michael@0: { "EK", "RUs=" }, michael@0: { "ET", "RVQ=" }, michael@0: { "IM", "SU0=" }, michael@0: { "JR", "SlI=" }, michael@0: { "LO", "TE8=" }, michael@0: { "LW", "TFc=" }, michael@0: { "ML", "TUw=" }, michael@0: { "SB", "U0I=" }, michael@0: { "TO", "VE8=" }, michael@0: { "VS", "VlM=" }, michael@0: { "WP", "V1A=" }, michael@0: /* legitimate two-letter words */ michael@0: { "ad", "YWQ=" }, michael@0: { "ah", "YWg=" }, michael@0: { "am", "YW0=" }, michael@0: { "an", "YW4=" }, michael@0: { "as", "YXM=" }, michael@0: { "at", "YXQ=" }, michael@0: { "ax", "YXg=" }, michael@0: { "be", "YmU=" }, michael@0: { "by", "Ynk=" }, michael@0: { "do", "ZG8=" }, michael@0: { "go", "Z28=" }, michael@0: { "he", "aGU=" }, michael@0: { "hi", "aGk=" }, michael@0: { "if", "aWY=" }, michael@0: { "in", "aW4=" }, michael@0: { "is", "aXM=" }, michael@0: { "it", "aXQ=" }, michael@0: { "me", "bWU=" }, michael@0: { "my", "bXk=" }, michael@0: { "no", "bm8=" }, michael@0: { "of", "b2Y=" }, michael@0: { "on", "b24=" }, michael@0: { "or", "b3I=" }, michael@0: { "ox", "b3g=" }, michael@0: { "so", "c28=" }, michael@0: { "to", "dG8=" }, michael@0: { "up", "dXA=" }, michael@0: { "us", "dXM=" }, michael@0: { "we", "d2U=" }, michael@0: /* all three-letter entries in /usr/dict/words */ michael@0: { "1st", "MXN0" }, michael@0: { "2nd", "Mm5k" }, michael@0: { "3rd", "M3Jk" }, michael@0: { "4th", "NHRo" }, michael@0: { "5th", "NXRo" }, michael@0: { "6th", "NnRo" }, michael@0: { "7th", "N3Ro" }, michael@0: { "8th", "OHRo" }, michael@0: { "9th", "OXRo" }, michael@0: { "AAA", "QUFB" }, michael@0: { "AAU", "QUFV" }, michael@0: { "ABA", "QUJB" }, michael@0: { "abc", "YWJj" }, michael@0: { "Abe", "QWJl" }, michael@0: { "Abo", "QWJv" }, michael@0: { "ace", "YWNl" }, michael@0: { "ACM", "QUNN" }, michael@0: { "ACS", "QUNT" }, michael@0: { "act", "YWN0" }, michael@0: { "Ada", "QWRh" }, michael@0: { "add", "YWRk" }, michael@0: { "ado", "YWRv" }, michael@0: { "aft", "YWZ0" }, michael@0: { "age", "YWdl" }, michael@0: { "ago", "YWdv" }, michael@0: { "aid", "YWlk" }, michael@0: { "ail", "YWls" }, michael@0: { "aim", "YWlt" }, michael@0: { "air", "YWly" }, michael@0: { "ala", "YWxh" }, michael@0: { "alb", "YWxi" }, michael@0: { "ale", "YWxl" }, michael@0: { "Ali", "QWxp" }, michael@0: { "all", "YWxs" }, michael@0: { "alp", "YWxw" }, michael@0: { "A&M", "QSZN" }, michael@0: { "AMA", "QU1B" }, michael@0: { "ami", "YW1p" }, michael@0: { "amp", "YW1w" }, michael@0: { "Amy", "QW15" }, michael@0: { "amy", "YW15" }, michael@0: { "ana", "YW5h" }, michael@0: { "and", "YW5k" }, michael@0: { "ani", "YW5p" }, michael@0: { "Ann", "QW5u" }, michael@0: { "ant", "YW50" }, michael@0: { "any", "YW55" }, michael@0: { "A&P", "QSZQ" }, michael@0: { "ape", "YXBl" }, michael@0: { "Apr", "QXBy" }, michael@0: { "APS", "QVBT" }, michael@0: { "apt", "YXB0" }, michael@0: { "arc", "YXJj" }, michael@0: { "are", "YXJl" }, michael@0: { "ark", "YXJr" }, michael@0: { "arm", "YXJt" }, michael@0: { "art", "YXJ0" }, michael@0: { "a's", "YSdz" }, michael@0: { "ash", "YXNo" }, michael@0: { "ask", "YXNr" }, michael@0: { "ass", "YXNz" }, michael@0: { "ate", "YXRl" }, michael@0: { "Aug", "QXVn" }, michael@0: { "auk", "YXVr" }, michael@0: { "Ave", "QXZl" }, michael@0: { "awe", "YXdl" }, michael@0: { "awl", "YXds" }, michael@0: { "awn", "YXdu" }, michael@0: { "axe", "YXhl" }, michael@0: { "aye", "YXll" }, michael@0: { "bad", "YmFk" }, michael@0: { "bag", "YmFn" }, michael@0: { "bah", "YmFo" }, michael@0: { "bam", "YmFt" }, michael@0: { "ban", "YmFu" }, michael@0: { "bar", "YmFy" }, michael@0: { "bat", "YmF0" }, michael@0: { "bay", "YmF5" }, michael@0: { "bed", "YmVk" }, michael@0: { "bee", "YmVl" }, michael@0: { "beg", "YmVn" }, michael@0: { "bel", "YmVs" }, michael@0: { "Ben", "QmVu" }, michael@0: { "bet", "YmV0" }, michael@0: { "bey", "YmV5" }, michael@0: { "bib", "Ymli" }, michael@0: { "bid", "Ymlk" }, michael@0: { "big", "Ymln" }, michael@0: { "bin", "Ymlu" }, michael@0: { "bit", "Yml0" }, michael@0: { "biz", "Yml6" }, michael@0: { "BMW", "Qk1X" }, michael@0: { "boa", "Ym9h" }, michael@0: { "bob", "Ym9i" }, michael@0: { "bog", "Ym9n" }, michael@0: { "bon", "Ym9u" }, michael@0: { "boo", "Ym9v" }, michael@0: { "bop", "Ym9w" }, michael@0: { "bow", "Ym93" }, michael@0: { "box", "Ym94" }, michael@0: { "boy", "Ym95" }, michael@0: { "b's", "Yidz" }, michael@0: { "BTL", "QlRM" }, michael@0: { "BTU", "QlRV" }, michael@0: { "bub", "YnVi" }, michael@0: { "bud", "YnVk" }, michael@0: { "bug", "YnVn" }, michael@0: { "bum", "YnVt" }, michael@0: { "bun", "YnVu" }, michael@0: { "bus", "YnVz" }, michael@0: { "but", "YnV0" }, michael@0: { "buy", "YnV5" }, michael@0: { "bye", "Ynll" }, michael@0: { "cab", "Y2Fi" }, michael@0: { "Cal", "Q2Fs" }, michael@0: { "cam", "Y2Ft" }, michael@0: { "can", "Y2Fu" }, michael@0: { "cap", "Y2Fw" }, michael@0: { "car", "Y2Fy" }, michael@0: { "cat", "Y2F0" }, michael@0: { "caw", "Y2F3" }, michael@0: { "CBS", "Q0JT" }, michael@0: { "CDC", "Q0RD" }, michael@0: { "CEQ", "Q0VR" }, michael@0: { "chi", "Y2hp" }, michael@0: { "CIA", "Q0lB" }, michael@0: { "cit", "Y2l0" }, michael@0: { "cod", "Y29k" }, michael@0: { "cog", "Y29n" }, michael@0: { "col", "Y29s" }, michael@0: { "con", "Y29u" }, michael@0: { "coo", "Y29v" }, michael@0: { "cop", "Y29w" }, michael@0: { "cos", "Y29z" }, michael@0: { "cot", "Y290" }, michael@0: { "cow", "Y293" }, michael@0: { "cox", "Y294" }, michael@0: { "coy", "Y295" }, michael@0: { "CPA", "Q1BB" }, michael@0: { "cpu", "Y3B1" }, michael@0: { "CRT", "Q1JU" }, michael@0: { "cry", "Y3J5" }, michael@0: { "c's", "Yydz" }, michael@0: { "cub", "Y3Vi" }, michael@0: { "cud", "Y3Vk" }, michael@0: { "cue", "Y3Vl" }, michael@0: { "cup", "Y3Vw" }, michael@0: { "cur", "Y3Vy" }, michael@0: { "cut", "Y3V0" }, michael@0: { "dab", "ZGFi" }, michael@0: { "dad", "ZGFk" }, michael@0: { "dam", "ZGFt" }, michael@0: { "Dan", "RGFu" }, michael@0: { "Dar", "RGFy" }, michael@0: { "day", "ZGF5" }, michael@0: { "Dec", "RGVj" }, michael@0: { "Dee", "RGVl" }, michael@0: { "Del", "RGVs" }, michael@0: { "den", "ZGVu" }, michael@0: { "Des", "RGVz" }, michael@0: { "dew", "ZGV3" }, michael@0: { "dey", "ZGV5" }, michael@0: { "did", "ZGlk" }, michael@0: { "die", "ZGll" }, michael@0: { "dig", "ZGln" }, michael@0: { "dim", "ZGlt" }, michael@0: { "din", "ZGlu" }, michael@0: { "dip", "ZGlw" }, michael@0: { "Dis", "RGlz" }, michael@0: { "DNA", "RE5B" }, michael@0: { "DOD", "RE9E" }, michael@0: { "doe", "ZG9l" }, michael@0: { "dog", "ZG9n" }, michael@0: { "don", "ZG9u" }, michael@0: { "dot", "ZG90" }, michael@0: { "Dow", "RG93" }, michael@0: { "dry", "ZHJ5" }, michael@0: { "d's", "ZCdz" }, michael@0: { "dub", "ZHVi" }, michael@0: { "dud", "ZHVk" }, michael@0: { "due", "ZHVl" }, michael@0: { "dug", "ZHVn" }, michael@0: { "dun", "ZHVu" }, michael@0: { "dye", "ZHll" }, michael@0: { "ear", "ZWFy" }, michael@0: { "eat", "ZWF0" }, michael@0: { "ebb", "ZWJi" }, michael@0: { "EDT", "RURU" }, michael@0: { "eel", "ZWVs" }, michael@0: { "eft", "ZWZ0" }, michael@0: { "e.g", "ZS5n" }, michael@0: { "egg", "ZWdn" }, michael@0: { "ego", "ZWdv" }, michael@0: { "eke", "ZWtl" }, michael@0: { "Eli", "RWxp" }, michael@0: { "elk", "ZWxr" }, michael@0: { "ell", "ZWxs" }, michael@0: { "elm", "ZWxt" }, michael@0: { "Ely", "RWx5" }, michael@0: { "end", "ZW5k" }, michael@0: { "Eng", "RW5n" }, michael@0: { "EPA", "RVBB" }, michael@0: { "era", "ZXJh" }, michael@0: { "ere", "ZXJl" }, michael@0: { "erg", "ZXJn" }, michael@0: { "err", "ZXJy" }, michael@0: { "e's", "ZSdz" }, michael@0: { "EST", "RVNU" }, michael@0: { "eta", "ZXRh" }, michael@0: { "etc", "ZXRj" }, michael@0: { "Eva", "RXZh" }, michael@0: { "eve", "ZXZl" }, michael@0: { "ewe", "ZXdl" }, michael@0: { "eye", "ZXll" }, michael@0: { "FAA", "RkFB" }, michael@0: { "fad", "ZmFk" }, michael@0: { "fag", "ZmFn" }, michael@0: { "fan", "ZmFu" }, michael@0: { "far", "ZmFy" }, michael@0: { "fat", "ZmF0" }, michael@0: { "fay", "ZmF5" }, michael@0: { "FBI", "RkJJ" }, michael@0: { "FCC", "RkND" }, michael@0: { "FDA", "RkRB" }, michael@0: { "Feb", "RmVi" }, michael@0: { "fed", "ZmVk" }, michael@0: { "fee", "ZmVl" }, michael@0: { "few", "ZmV3" }, michael@0: { "fib", "Zmli" }, michael@0: { "fig", "Zmln" }, michael@0: { "fin", "Zmlu" }, michael@0: { "fir", "Zmly" }, michael@0: { "fit", "Zml0" }, michael@0: { "fix", "Zml4" }, michael@0: { "Flo", "Rmxv" }, michael@0: { "flu", "Zmx1" }, michael@0: { "fly", "Zmx5" }, michael@0: { "FMC", "Rk1D" }, michael@0: { "fob", "Zm9i" }, michael@0: { "foe", "Zm9l" }, michael@0: { "fog", "Zm9n" }, michael@0: { "fop", "Zm9w" }, michael@0: { "for", "Zm9y" }, michael@0: { "fox", "Zm94" }, michael@0: { "FPC", "RlBD" }, michael@0: { "fro", "ZnJv" }, michael@0: { "fry", "ZnJ5" }, michael@0: { "f's", "Zidz" }, michael@0: { "FTC", "RlRD" }, michael@0: { "fum", "ZnVt" }, michael@0: { "fun", "ZnVu" }, michael@0: { "fur", "ZnVy" }, michael@0: { "gab", "Z2Fi" }, michael@0: { "gad", "Z2Fk" }, michael@0: { "gag", "Z2Fn" }, michael@0: { "gal", "Z2Fs" }, michael@0: { "gam", "Z2Ft" }, michael@0: { "GAO", "R0FP" }, michael@0: { "gap", "Z2Fw" }, michael@0: { "gar", "Z2Fy" }, michael@0: { "gas", "Z2Fz" }, michael@0: { "gay", "Z2F5" }, michael@0: { "gee", "Z2Vl" }, michael@0: { "gel", "Z2Vs" }, michael@0: { "gem", "Z2Vt" }, michael@0: { "get", "Z2V0" }, michael@0: { "gig", "Z2ln" }, michael@0: { "Gil", "R2ls" }, michael@0: { "gin", "Z2lu" }, michael@0: { "GMT", "R01U" }, michael@0: { "GNP", "R05Q" }, michael@0: { "gnu", "Z251" }, michael@0: { "Goa", "R29h" }, michael@0: { "gob", "Z29i" }, michael@0: { "god", "Z29k" }, michael@0: { "gog", "Z29n" }, michael@0: { "GOP", "R09Q" }, michael@0: { "got", "Z290" }, michael@0: { "GPO", "R1BP" }, michael@0: { "g's", "Zydz" }, michael@0: { "GSA", "R1NB" }, michael@0: { "gum", "Z3Vt" }, michael@0: { "gun", "Z3Vu" }, michael@0: { "Gus", "R3Vz" }, michael@0: { "gut", "Z3V0" }, michael@0: { "guy", "Z3V5" }, michael@0: { "gym", "Z3lt" }, michael@0: { "gyp", "Z3lw" }, michael@0: { "had", "aGFk" }, michael@0: { "Hal", "SGFs" }, michael@0: { "ham", "aGFt" }, michael@0: { "Han", "SGFu" }, michael@0: { "hap", "aGFw" }, michael@0: { "hat", "aGF0" }, michael@0: { "haw", "aGF3" }, michael@0: { "hay", "aGF5" }, michael@0: { "hem", "aGVt" }, michael@0: { "hen", "aGVu" }, michael@0: { "her", "aGVy" }, michael@0: { "hew", "aGV3" }, michael@0: { "hex", "aGV4" }, michael@0: { "hey", "aGV5" }, michael@0: { "hid", "aGlk" }, michael@0: { "him", "aGlt" }, michael@0: { "hip", "aGlw" }, michael@0: { "his", "aGlz" }, michael@0: { "hit", "aGl0" }, michael@0: { "hob", "aG9i" }, michael@0: { "hoc", "aG9j" }, michael@0: { "hoe", "aG9l" }, michael@0: { "hog", "aG9n" }, michael@0: { "hoi", "aG9p" }, michael@0: { "Hom", "SG9t" }, michael@0: { "hop", "aG9w" }, michael@0: { "hot", "aG90" }, michael@0: { "how", "aG93" }, michael@0: { "hoy", "aG95" }, michael@0: { "h's", "aCdz" }, michael@0: { "hub", "aHVi" }, michael@0: { "hue", "aHVl" }, michael@0: { "hug", "aHVn" }, michael@0: { "huh", "aHVo" }, michael@0: { "hum", "aHVt" }, michael@0: { "Hun", "SHVu" }, michael@0: { "hut", "aHV0" }, michael@0: { "Ian", "SWFu" }, michael@0: { "IBM", "SUJN" }, michael@0: { "Ibn", "SWJu" }, michael@0: { "ICC", "SUND" }, michael@0: { "ice", "aWNl" }, michael@0: { "icy", "aWN5" }, michael@0: { "I'd", "SSdk" }, michael@0: { "Ida", "SWRh" }, michael@0: { "i.e", "aS5l" }, michael@0: { "iii", "aWlp" }, michael@0: { "Ike", "SWtl" }, michael@0: { "ill", "aWxs" }, michael@0: { "I'm", "SSdt" }, michael@0: { "imp", "aW1w" }, michael@0: { "Inc", "SW5j" }, michael@0: { "ink", "aW5r" }, michael@0: { "inn", "aW5u" }, michael@0: { "ion", "aW9u" }, michael@0: { "Ira", "SXJh" }, michael@0: { "ire", "aXJl" }, michael@0: { "irk", "aXJr" }, michael@0: { "IRS", "SVJT" }, michael@0: { "i's", "aSdz" }, michael@0: { "Ito", "SXRv" }, michael@0: { "ITT", "SVRU" }, michael@0: { "ivy", "aXZ5" }, michael@0: { "jab", "amFi" }, michael@0: { "jag", "amFn" }, michael@0: { "jam", "amFt" }, michael@0: { "Jan", "SmFu" }, michael@0: { "jar", "amFy" }, michael@0: { "jaw", "amF3" }, michael@0: { "jay", "amF5" }, michael@0: { "Jed", "SmVk" }, michael@0: { "jet", "amV0" }, michael@0: { "Jew", "SmV3" }, michael@0: { "jig", "amln" }, michael@0: { "Jim", "Smlt" }, michael@0: { "job", "am9i" }, michael@0: { "Joe", "Sm9l" }, michael@0: { "jog", "am9n" }, michael@0: { "Jon", "Sm9u" }, michael@0: { "jot", "am90" }, michael@0: { "joy", "am95" }, michael@0: { "j's", "aidz" }, michael@0: { "jug", "anVn" }, michael@0: { "jut", "anV0" }, michael@0: { "Kay", "S2F5" }, michael@0: { "keg", "a2Vn" }, michael@0: { "ken", "a2Vu" }, michael@0: { "key", "a2V5" }, michael@0: { "kid", "a2lk" }, michael@0: { "Kim", "S2lt" }, michael@0: { "kin", "a2lu" }, michael@0: { "kit", "a2l0" }, michael@0: { "k's", "aydz" }, michael@0: { "lab", "bGFi" }, michael@0: { "lac", "bGFj" }, michael@0: { "lad", "bGFk" }, michael@0: { "lag", "bGFn" }, michael@0: { "lam", "bGFt" }, michael@0: { "Lao", "TGFv" }, michael@0: { "lap", "bGFw" }, michael@0: { "law", "bGF3" }, michael@0: { "lax", "bGF4" }, michael@0: { "lay", "bGF5" }, michael@0: { "lea", "bGVh" }, michael@0: { "led", "bGVk" }, michael@0: { "lee", "bGVl" }, michael@0: { "leg", "bGVn" }, michael@0: { "Len", "TGVu" }, michael@0: { "Leo", "TGVv" }, michael@0: { "let", "bGV0" }, michael@0: { "Lev", "TGV2" }, michael@0: { "Lew", "TGV3" }, michael@0: { "lew", "bGV3" }, michael@0: { "lid", "bGlk" }, michael@0: { "lie", "bGll" }, michael@0: { "lim", "bGlt" }, michael@0: { "Lin", "TGlu" }, michael@0: { "lip", "bGlw" }, michael@0: { "lit", "bGl0" }, michael@0: { "Liz", "TGl6" }, michael@0: { "lob", "bG9i" }, michael@0: { "log", "bG9n" }, michael@0: { "lop", "bG9w" }, michael@0: { "Los", "TG9z" }, michael@0: { "lot", "bG90" }, michael@0: { "Lou", "TG91" }, michael@0: { "low", "bG93" }, michael@0: { "loy", "bG95" }, michael@0: { "l's", "bCdz" }, michael@0: { "LSI", "TFNJ" }, michael@0: { "Ltd", "THRk" }, michael@0: { "LTV", "TFRW" }, michael@0: { "lug", "bHVn" }, michael@0: { "lux", "bHV4" }, michael@0: { "lye", "bHll" }, michael@0: { "Mac", "TWFj" }, michael@0: { "mad", "bWFk" }, michael@0: { "Mae", "TWFl" }, michael@0: { "man", "bWFu" }, michael@0: { "Mao", "TWFv" }, michael@0: { "map", "bWFw" }, michael@0: { "mar", "bWFy" }, michael@0: { "mat", "bWF0" }, michael@0: { "maw", "bWF3" }, michael@0: { "Max", "TWF4" }, michael@0: { "max", "bWF4" }, michael@0: { "may", "bWF5" }, michael@0: { "MBA", "TUJB" }, michael@0: { "Meg", "TWVn" }, michael@0: { "Mel", "TWVs" }, michael@0: { "men", "bWVu" }, michael@0: { "met", "bWV0" }, michael@0: { "mew", "bWV3" }, michael@0: { "mid", "bWlk" }, michael@0: { "mig", "bWln" }, michael@0: { "min", "bWlu" }, michael@0: { "MIT", "TUlU" }, michael@0: { "mix", "bWl4" }, michael@0: { "mob", "bW9i" }, michael@0: { "Moe", "TW9l" }, michael@0: { "moo", "bW9v" }, michael@0: { "mop", "bW9w" }, michael@0: { "mot", "bW90" }, michael@0: { "mow", "bW93" }, michael@0: { "MPH", "TVBI" }, michael@0: { "Mrs", "TXJz" }, michael@0: { "m's", "bSdz" }, michael@0: { "mud", "bXVk" }, michael@0: { "mug", "bXVn" }, michael@0: { "mum", "bXVt" }, michael@0: { "nab", "bmFi" }, michael@0: { "nag", "bmFn" }, michael@0: { "Nan", "TmFu" }, michael@0: { "nap", "bmFw" }, michael@0: { "Nat", "TmF0" }, michael@0: { "nay", "bmF5" }, michael@0: { "NBC", "TkJD" }, michael@0: { "NBS", "TkJT" }, michael@0: { "NCO", "TkNP" }, michael@0: { "NCR", "TkNS" }, michael@0: { "Ned", "TmVk" }, michael@0: { "nee", "bmVl" }, michael@0: { "net", "bmV0" }, michael@0: { "new", "bmV3" }, michael@0: { "nib", "bmli" }, michael@0: { "NIH", "TklI" }, michael@0: { "nil", "bmls" }, michael@0: { "nip", "bmlw" }, michael@0: { "nit", "bml0" }, michael@0: { "NNE", "Tk5F" }, michael@0: { "NNW", "Tk5X" }, michael@0: { "nob", "bm9i" }, michael@0: { "nod", "bm9k" }, michael@0: { "non", "bm9u" }, michael@0: { "nor", "bm9y" }, michael@0: { "not", "bm90" }, michael@0: { "Nov", "Tm92" }, michael@0: { "now", "bm93" }, michael@0: { "NRC", "TlJD" }, michael@0: { "n's", "bidz" }, michael@0: { "NSF", "TlNG" }, michael@0: { "nun", "bnVu" }, michael@0: { "nut", "bnV0" }, michael@0: { "NYC", "TllD" }, michael@0: { "NYU", "TllV" }, michael@0: { "oaf", "b2Fm" }, michael@0: { "oak", "b2Fr" }, michael@0: { "oar", "b2Fy" }, michael@0: { "oat", "b2F0" }, michael@0: { "Oct", "T2N0" }, michael@0: { "odd", "b2Rk" }, michael@0: { "ode", "b2Rl" }, michael@0: { "off", "b2Zm" }, michael@0: { "oft", "b2Z0" }, michael@0: { "ohm", "b2ht" }, michael@0: { "oil", "b2ls" }, michael@0: { "old", "b2xk" }, michael@0: { "one", "b25l" }, michael@0: { "opt", "b3B0" }, michael@0: { "orb", "b3Ji" }, michael@0: { "ore", "b3Jl" }, michael@0: { "Orr", "T3Jy" }, michael@0: { "o's", "bydz" }, michael@0: { "Ott", "T3R0" }, michael@0: { "our", "b3Vy" }, michael@0: { "out", "b3V0" }, michael@0: { "ova", "b3Zh" }, michael@0: { "owe", "b3dl" }, michael@0: { "owl", "b3ds" }, michael@0: { "own", "b3du" }, michael@0: { "pad", "cGFk" }, michael@0: { "pal", "cGFs" }, michael@0: { "Pam", "UGFt" }, michael@0: { "pan", "cGFu" }, michael@0: { "pap", "cGFw" }, michael@0: { "par", "cGFy" }, michael@0: { "pat", "cGF0" }, michael@0: { "paw", "cGF3" }, michael@0: { "pax", "cGF4" }, michael@0: { "pay", "cGF5" }, michael@0: { "Paz", "UGF6" }, michael@0: { "PBS", "UEJT" }, michael@0: { "PDP", "UERQ" }, michael@0: { "pea", "cGVh" }, michael@0: { "pee", "cGVl" }, michael@0: { "peg", "cGVn" }, michael@0: { "pen", "cGVu" }, michael@0: { "pep", "cGVw" }, michael@0: { "per", "cGVy" }, michael@0: { "pet", "cGV0" }, michael@0: { "pew", "cGV3" }, michael@0: { "PhD", "UGhE" }, michael@0: { "phi", "cGhp" }, michael@0: { "pie", "cGll" }, michael@0: { "pig", "cGln" }, michael@0: { "pin", "cGlu" }, michael@0: { "pip", "cGlw" }, michael@0: { "pit", "cGl0" }, michael@0: { "ply", "cGx5" }, michael@0: { "pod", "cG9k" }, michael@0: { "Poe", "UG9l" }, michael@0: { "poi", "cG9p" }, michael@0: { "pol", "cG9s" }, michael@0: { "pop", "cG9w" }, michael@0: { "pot", "cG90" }, michael@0: { "pow", "cG93" }, michael@0: { "ppm", "cHBt" }, michael@0: { "pro", "cHJv" }, michael@0: { "pry", "cHJ5" }, michael@0: { "p's", "cCdz" }, michael@0: { "psi", "cHNp" }, michael@0: { "PTA", "UFRB" }, michael@0: { "pub", "cHVi" }, michael@0: { "PUC", "UFVD" }, michael@0: { "pug", "cHVn" }, michael@0: { "pun", "cHVu" }, michael@0: { "pup", "cHVw" }, michael@0: { "pus", "cHVz" }, michael@0: { "put", "cHV0" }, michael@0: { "PVC", "UFZD" }, michael@0: { "QED", "UUVE" }, michael@0: { "q's", "cSdz" }, michael@0: { "qua", "cXVh" }, michael@0: { "quo", "cXVv" }, michael@0: { "Rae", "UmFl" }, michael@0: { "rag", "cmFn" }, michael@0: { "raj", "cmFq" }, michael@0: { "ram", "cmFt" }, michael@0: { "ran", "cmFu" }, michael@0: { "rap", "cmFw" }, michael@0: { "rat", "cmF0" }, michael@0: { "raw", "cmF3" }, michael@0: { "ray", "cmF5" }, michael@0: { "RCA", "UkNB" }, michael@0: { "R&D", "UiZE" }, michael@0: { "reb", "cmVi" }, michael@0: { "red", "cmVk" }, michael@0: { "rep", "cmVw" }, michael@0: { "ret", "cmV0" }, michael@0: { "rev", "cmV2" }, michael@0: { "Rex", "UmV4" }, michael@0: { "rho", "cmhv" }, michael@0: { "rib", "cmli" }, michael@0: { "rid", "cmlk" }, michael@0: { "rig", "cmln" }, michael@0: { "rim", "cmlt" }, michael@0: { "Rio", "Umlv" }, michael@0: { "rip", "cmlw" }, michael@0: { "RNA", "Uk5B" }, michael@0: { "rob", "cm9i" }, michael@0: { "rod", "cm9k" }, michael@0: { "roe", "cm9l" }, michael@0: { "Ron", "Um9u" }, michael@0: { "rot", "cm90" }, michael@0: { "row", "cm93" }, michael@0: { "Roy", "Um95" }, michael@0: { "RPM", "UlBN" }, michael@0: { "r's", "cidz" }, michael@0: { "rub", "cnVi" }, michael@0: { "rue", "cnVl" }, michael@0: { "rug", "cnVn" }, michael@0: { "rum", "cnVt" }, michael@0: { "run", "cnVu" }, michael@0: { "rut", "cnV0" }, michael@0: { "rye", "cnll" }, michael@0: { "sac", "c2Fj" }, michael@0: { "sad", "c2Fk" }, michael@0: { "sag", "c2Fn" }, michael@0: { "Sal", "U2Fs" }, michael@0: { "Sam", "U2Ft" }, michael@0: { "San", "U2Fu" }, michael@0: { "Sao", "U2Fv" }, michael@0: { "sap", "c2Fw" }, michael@0: { "sat", "c2F0" }, michael@0: { "saw", "c2F3" }, michael@0: { "sax", "c2F4" }, michael@0: { "say", "c2F5" }, michael@0: { "Sci", "U2Np" }, michael@0: { "SCM", "U0NN" }, michael@0: { "sea", "c2Vh" }, michael@0: { "sec", "c2Vj" }, michael@0: { "see", "c2Vl" }, michael@0: { "sen", "c2Vu" }, michael@0: { "seq", "c2Vx" }, michael@0: { "set", "c2V0" }, michael@0: { "sew", "c2V3" }, michael@0: { "sex", "c2V4" }, michael@0: { "she", "c2hl" }, michael@0: { "Shu", "U2h1" }, michael@0: { "shy", "c2h5" }, michael@0: { "sib", "c2li" }, michael@0: { "sic", "c2lj" }, michael@0: { "sin", "c2lu" }, michael@0: { "sip", "c2lw" }, michael@0: { "sir", "c2ly" }, michael@0: { "sis", "c2lz" }, michael@0: { "sit", "c2l0" }, michael@0: { "six", "c2l4" }, michael@0: { "ski", "c2tp" }, michael@0: { "sky", "c2t5" }, michael@0: { "sly", "c2x5" }, michael@0: { "sob", "c29i" }, michael@0: { "Soc", "U29j" }, michael@0: { "sod", "c29k" }, michael@0: { "Sol", "U29s" }, michael@0: { "son", "c29u" }, michael@0: { "sop", "c29w" }, michael@0: { "sou", "c291" }, michael@0: { "sow", "c293" }, michael@0: { "soy", "c295" }, michael@0: { "spa", "c3Bh" }, michael@0: { "spy", "c3B5" }, michael@0: { "Sri", "U3Jp" }, michael@0: { "s's", "cydz" }, michael@0: { "SSE", "U1NF" }, michael@0: { "SST", "U1NU" }, michael@0: { "SSW", "U1NX" }, michael@0: { "Stu", "U3R1" }, michael@0: { "sub", "c3Vi" }, michael@0: { "sud", "c3Vk" }, michael@0: { "sue", "c3Vl" }, michael@0: { "sum", "c3Vt" }, michael@0: { "sun", "c3Vu" }, michael@0: { "sup", "c3Vw" }, michael@0: { "Sus", "U3Vz" }, michael@0: { "tab", "dGFi" }, michael@0: { "tad", "dGFk" }, michael@0: { "tag", "dGFn" }, michael@0: { "tam", "dGFt" }, michael@0: { "tan", "dGFu" }, michael@0: { "tao", "dGFv" }, michael@0: { "tap", "dGFw" }, michael@0: { "tar", "dGFy" }, michael@0: { "tat", "dGF0" }, michael@0: { "tau", "dGF1" }, michael@0: { "tax", "dGF4" }, michael@0: { "tea", "dGVh" }, michael@0: { "Ted", "VGVk" }, michael@0: { "ted", "dGVk" }, michael@0: { "tee", "dGVl" }, michael@0: { "Tel", "VGVs" }, michael@0: { "ten", "dGVu" }, michael@0: { "the", "dGhl" }, michael@0: { "thy", "dGh5" }, michael@0: { "tic", "dGlj" }, michael@0: { "tid", "dGlk" }, michael@0: { "tie", "dGll" }, michael@0: { "til", "dGls" }, michael@0: { "Tim", "VGlt" }, michael@0: { "tin", "dGlu" }, michael@0: { "tip", "dGlw" }, michael@0: { "tit", "dGl0" }, michael@0: { "TNT", "VE5U" }, michael@0: { "toe", "dG9l" }, michael@0: { "tog", "dG9n" }, michael@0: { "Tom", "VG9t" }, michael@0: { "ton", "dG9u" }, michael@0: { "too", "dG9v" }, michael@0: { "top", "dG9w" }, michael@0: { "tor", "dG9y" }, michael@0: { "tot", "dG90" }, michael@0: { "tow", "dG93" }, michael@0: { "toy", "dG95" }, michael@0: { "TRW", "VFJX" }, michael@0: { "try", "dHJ5" }, michael@0: { "t's", "dCdz" }, michael@0: { "TTL", "VFRM" }, michael@0: { "TTY", "VFRZ" }, michael@0: { "tub", "dHVi" }, michael@0: { "tug", "dHVn" }, michael@0: { "tum", "dHVt" }, michael@0: { "tun", "dHVu" }, michael@0: { "TVA", "VFZB" }, michael@0: { "TWA", "VFdB" }, michael@0: { "two", "dHdv" }, michael@0: { "TWX", "VFdY" }, michael@0: { "ugh", "dWdo" }, michael@0: { "UHF", "VUhG" }, michael@0: { "Uri", "VXJp" }, michael@0: { "urn", "dXJu" }, michael@0: { "U.S", "VS5T" }, michael@0: { "u's", "dSdz" }, michael@0: { "USA", "VVNB" }, michael@0: { "USC", "VVND" }, michael@0: { "use", "dXNl" }, michael@0: { "USN", "VVNO" }, michael@0: { "van", "dmFu" }, michael@0: { "vat", "dmF0" }, michael@0: { "vee", "dmVl" }, michael@0: { "vet", "dmV0" }, michael@0: { "vex", "dmV4" }, michael@0: { "VHF", "VkhG" }, michael@0: { "via", "dmlh" }, michael@0: { "vie", "dmll" }, michael@0: { "vii", "dmlp" }, michael@0: { "vis", "dmlz" }, michael@0: { "viz", "dml6" }, michael@0: { "von", "dm9u" }, michael@0: { "vow", "dm93" }, michael@0: { "v's", "didz" }, michael@0: { "WAC", "V0FD" }, michael@0: { "wad", "d2Fk" }, michael@0: { "wag", "d2Fn" }, michael@0: { "wah", "d2Fo" }, michael@0: { "wan", "d2Fu" }, michael@0: { "war", "d2Fy" }, michael@0: { "was", "d2Fz" }, michael@0: { "wax", "d2F4" }, michael@0: { "way", "d2F5" }, michael@0: { "web", "d2Vi" }, michael@0: { "wed", "d2Vk" }, michael@0: { "wee", "d2Vl" }, michael@0: { "Wei", "V2Vp" }, michael@0: { "wet", "d2V0" }, michael@0: { "who", "d2hv" }, michael@0: { "why", "d2h5" }, michael@0: { "wig", "d2ln" }, michael@0: { "win", "d2lu" }, michael@0: { "wit", "d2l0" }, michael@0: { "woe", "d29l" }, michael@0: { "wok", "d29r" }, michael@0: { "won", "d29u" }, michael@0: { "woo", "d29v" }, michael@0: { "wop", "d29w" }, michael@0: { "wow", "d293" }, michael@0: { "wry", "d3J5" }, michael@0: { "w's", "dydz" }, michael@0: { "x's", "eCdz" }, michael@0: { "yah", "eWFo" }, michael@0: { "yak", "eWFr" }, michael@0: { "yam", "eWFt" }, michael@0: { "yap", "eWFw" }, michael@0: { "yaw", "eWF3" }, michael@0: { "yea", "eWVh" }, michael@0: { "yen", "eWVu" }, michael@0: { "yet", "eWV0" }, michael@0: { "yin", "eWlu" }, michael@0: { "yip", "eWlw" }, michael@0: { "yon", "eW9u" }, michael@0: { "you", "eW91" }, michael@0: { "yow", "eW93" }, michael@0: { "y's", "eSdz" }, michael@0: { "yuh", "eXVo" }, michael@0: { "zag", "emFn" }, michael@0: { "Zan", "WmFu" }, michael@0: { "zap", "emFw" }, michael@0: { "Zen", "WmVu" }, michael@0: { "zig", "emln" }, michael@0: { "zip", "emlw" }, michael@0: { "Zoe", "Wm9l" }, michael@0: { "zoo", "em9v" }, michael@0: { "z's", "eidz" }, michael@0: /* the false rumors file */ michael@0: { "\"So when I die, the first thing I will see in heaven is a score list?\"", michael@0: "IlNvIHdoZW4gSSBkaWUsIHRoZSBmaXJzdCB0aGluZyBJIHdpbGwgc2VlIGluIGhlYXZlbiBpcyBhIHNjb3JlIGxpc3Q/Ig==" }, michael@0: { "1st Law of Hacking: leaving is much more difficult than entering.", michael@0: "MXN0IExhdyBvZiBIYWNraW5nOiBsZWF2aW5nIGlzIG11Y2ggbW9yZSBkaWZmaWN1bHQgdGhhbiBlbnRlcmluZy4=" }, michael@0: { "2nd Law of Hacking: first in, first out.", michael@0: "Mm5kIExhdyBvZiBIYWNraW5nOiBmaXJzdCBpbiwgZmlyc3Qgb3V0Lg==" }, michael@0: { "3rd Law of Hacking: the last blow counts most.", michael@0: "M3JkIExhdyBvZiBIYWNraW5nOiB0aGUgbGFzdCBibG93IGNvdW50cyBtb3N0Lg==" }, michael@0: { "4th Law of Hacking: you will find the exit at the entrance.", michael@0: "NHRoIExhdyBvZiBIYWNraW5nOiB5b3Ugd2lsbCBmaW5kIHRoZSBleGl0IGF0IHRoZSBlbnRyYW5jZS4=" }, michael@0: { "A chameleon imitating a mail daemon often delivers scrolls of fire.", michael@0: "QSBjaGFtZWxlb24gaW1pdGF0aW5nIGEgbWFpbCBkYWVtb24gb2Z0ZW4gZGVsaXZlcnMgc2Nyb2xscyBvZiBmaXJlLg==" }, michael@0: { "A cockatrice corpse is guaranteed to be untainted!", michael@0: "QSBjb2NrYXRyaWNlIGNvcnBzZSBpcyBndWFyYW50ZWVkIHRvIGJlIHVudGFpbnRlZCE=" }, michael@0: { "A dead cockatrice is just a dead lizard.", michael@0: "QSBkZWFkIGNvY2thdHJpY2UgaXMganVzdCBhIGRlYWQgbGl6YXJkLg==" }, michael@0: { "A dragon is just a snake that ate a scroll of fire.", michael@0: "QSBkcmFnb24gaXMganVzdCBhIHNuYWtlIHRoYXQgYXRlIGEgc2Nyb2xsIG9mIGZpcmUu" }, michael@0: { "A fading corridor enlightens your insight.", michael@0: "QSBmYWRpbmcgY29ycmlkb3IgZW5saWdodGVucyB5b3VyIGluc2lnaHQu" }, michael@0: { "A glowing potion is too hot to drink.", michael@0: "QSBnbG93aW5nIHBvdGlvbiBpcyB0b28gaG90IHRvIGRyaW5rLg==" }, michael@0: { "A good amulet may protect you against guards.", michael@0: "QSBnb29kIGFtdWxldCBtYXkgcHJvdGVjdCB5b3UgYWdhaW5zdCBndWFyZHMu" }, michael@0: { "A lizard corpse is a good thing to turn undead.", michael@0: "QSBsaXphcmQgY29ycHNlIGlzIGEgZ29vZCB0aGluZyB0byB0dXJuIHVuZGVhZC4=" }, michael@0: { "A long worm can be defined recursively. So how should you attack it?", michael@0: "QSBsb25nIHdvcm0gY2FuIGJlIGRlZmluZWQgcmVjdXJzaXZlbHkuIFNvIGhvdyBzaG91bGQgeW91IGF0dGFjayBpdD8=" }, michael@0: { "A monstrous mind is a toy forever.", michael@0: "QSBtb25zdHJvdXMgbWluZCBpcyBhIHRveSBmb3JldmVyLg==" }, michael@0: { "A nymph will be very pleased if you call her by her real name: Lorelei.", michael@0: "QSBueW1waCB3aWxsIGJlIHZlcnkgcGxlYXNlZCBpZiB5b3UgY2FsbCBoZXIgYnkgaGVyIHJlYWwgbmFtZTogTG9yZWxlaS4=" }, michael@0: { "A ring of dungeon master control is a great find.", michael@0: "QSByaW5nIG9mIGR1bmdlb24gbWFzdGVyIGNvbnRyb2wgaXMgYSBncmVhdCBmaW5kLg==" }, michael@0: { "A ring of extra ring finger is useless if not enchanted.", michael@0: "QSByaW5nIG9mIGV4dHJhIHJpbmcgZmluZ2VyIGlzIHVzZWxlc3MgaWYgbm90IGVuY2hhbnRlZC4=" }, michael@0: { "A rope may form a trail in a maze.", michael@0: "QSByb3BlIG1heSBmb3JtIGEgdHJhaWwgaW4gYSBtYXplLg==" }, michael@0: { "A staff may recharge if you drop it for awhile.", michael@0: "QSBzdGFmZiBtYXkgcmVjaGFyZ2UgaWYgeW91IGRyb3AgaXQgZm9yIGF3aGlsZS4=" }, michael@0: { "A visit to the Zoo is very educational; you meet interesting animals.", michael@0: "QSB2aXNpdCB0byB0aGUgWm9vIGlzIHZlcnkgZWR1Y2F0aW9uYWw7IHlvdSBtZWV0IGludGVyZXN0aW5nIGFuaW1hbHMu" }, michael@0: { "A wand of deaf is a more dangerous weapon than a wand of sheep.", michael@0: "QSB3YW5kIG9mIGRlYWYgaXMgYSBtb3JlIGRhbmdlcm91cyB3ZWFwb24gdGhhbiBhIHdhbmQgb2Ygc2hlZXAu" }, michael@0: { "A wand of vibration might bring the whole cave crashing about your ears.", michael@0: "QSB3YW5kIG9mIHZpYnJhdGlvbiBtaWdodCBicmluZyB0aGUgd2hvbGUgY2F2ZSBjcmFzaGluZyBhYm91dCB5b3VyIGVhcnMu" }, michael@0: { "A winner never quits. A quitter never wins.", michael@0: "QSB3aW5uZXIgbmV2ZXIgcXVpdHMuIEEgcXVpdHRlciBuZXZlciB3aW5zLg==" }, michael@0: { "A wish? Okay, make me a fortune cookie!", michael@0: "QSB3aXNoPyBPa2F5LCBtYWtlIG1lIGEgZm9ydHVuZSBjb29raWUh" }, michael@0: { "Afraid of mimics? Try to wear a ring of true seeing.", michael@0: "QWZyYWlkIG9mIG1pbWljcz8gVHJ5IHRvIHdlYXIgYSByaW5nIG9mIHRydWUgc2VlaW5nLg==" }, michael@0: { "All monsters are created evil, but some are more evil than others.", michael@0: "QWxsIG1vbnN0ZXJzIGFyZSBjcmVhdGVkIGV2aWwsIGJ1dCBzb21lIGFyZSBtb3JlIGV2aWwgdGhhbiBvdGhlcnMu" }, michael@0: { "Always attack a floating eye from behind!", michael@0: "QWx3YXlzIGF0dGFjayBhIGZsb2F0aW5nIGV5ZSBmcm9tIGJlaGluZCE=" }, michael@0: { "An elven cloak is always the height of fashion.", michael@0: "QW4gZWx2ZW4gY2xvYWsgaXMgYWx3YXlzIHRoZSBoZWlnaHQgb2YgZmFzaGlvbi4=" }, michael@0: { "Any small object that is accidentally dropped will hide under a larger object.", michael@0: "QW55IHNtYWxsIG9iamVjdCB0aGF0IGlzIGFjY2lkZW50YWxseSBkcm9wcGVkIHdpbGwgaGlkZSB1bmRlciBhIGxhcmdlciBvYmplY3Qu" }, michael@0: { "Balrogs do not appear above level 20.", michael@0: "QmFscm9ncyBkbyBub3QgYXBwZWFyIGFib3ZlIGxldmVsIDIwLg==" }, michael@0: { "Banana peels work especially well against Keystone Kops.", michael@0: "QmFuYW5hIHBlZWxzIHdvcmsgZXNwZWNpYWxseSB3ZWxsIGFnYWluc3QgS2V5c3RvbmUgS29wcy4=" }, michael@0: { "Be careful when eating bananas. Monsters might slip on the peels.", michael@0: "QmUgY2FyZWZ1bCB3aGVuIGVhdGluZyBiYW5hbmFzLiBNb25zdGVycyBtaWdodCBzbGlwIG9uIHRoZSBwZWVscy4=" }, michael@0: { "Better leave the dungeon; otherwise you might get hurt badly.", michael@0: "QmV0dGVyIGxlYXZlIHRoZSBkdW5nZW9uOyBvdGhlcndpc2UgeW91IG1pZ2h0IGdldCBodXJ0IGJhZGx5Lg==" }, michael@0: { "Beware of the potion of nitroglycerin -- it's not for the weak of heart.", michael@0: "QmV3YXJlIG9mIHRoZSBwb3Rpb24gb2Ygbml0cm9nbHljZXJpbiAtLSBpdCdzIG5vdCBmb3IgdGhlIHdlYWsgb2YgaGVhcnQu" }, michael@0: { "Beware: there's always a chance that your wand explodes as you try to zap it!", michael@0: "QmV3YXJlOiB0aGVyZSdzIGFsd2F5cyBhIGNoYW5jZSB0aGF0IHlvdXIgd2FuZCBleHBsb2RlcyBhcyB5b3UgdHJ5IHRvIHphcCBpdCE=" }, michael@0: { "Beyond the 23rd level lies a happy retirement in a room of your own.", michael@0: "QmV5b25kIHRoZSAyM3JkIGxldmVsIGxpZXMgYSBoYXBweSByZXRpcmVtZW50IGluIGEgcm9vbSBvZiB5b3VyIG93bi4=" }, michael@0: { "Changing your suit without dropping your sword? You must be kidding!", michael@0: "Q2hhbmdpbmcgeW91ciBzdWl0IHdpdGhvdXQgZHJvcHBpbmcgeW91ciBzd29yZD8gWW91IG11c3QgYmUga2lkZGluZyE=" }, michael@0: { "Cockatrices might turn themselves to stone faced with a mirror.", michael@0: "Q29ja2F0cmljZXMgbWlnaHQgdHVybiB0aGVtc2VsdmVzIHRvIHN0b25lIGZhY2VkIHdpdGggYSBtaXJyb3Iu" }, michael@0: { "Consumption of home-made food is strictly forbidden in this dungeon.", michael@0: "Q29uc3VtcHRpb24gb2YgaG9tZS1tYWRlIGZvb2QgaXMgc3RyaWN0bHkgZm9yYmlkZGVuIGluIHRoaXMgZHVuZ2Vvbi4=" }, michael@0: { "Dark room? Your chance to develop your photographs!", michael@0: "RGFyayByb29tPyBZb3VyIGNoYW5jZSB0byBkZXZlbG9wIHlvdXIgcGhvdG9ncmFwaHMh" }, michael@0: { "Dark rooms are not *completely* dark: just wait and let your eyes adjust...", michael@0: "RGFyayByb29tcyBhcmUgbm90ICpjb21wbGV0ZWx5KiBkYXJrOiBqdXN0IHdhaXQgYW5kIGxldCB5b3VyIGV5ZXMgYWRqdXN0Li4u" }, michael@0: { "David London sez, \"Hey guys, *WIELD* a lizard corpse against a cockatrice!\"", michael@0: "RGF2aWQgTG9uZG9uIHNleiwgIkhleSBndXlzLCAqV0lFTEQqIGEgbGl6YXJkIGNvcnBzZSBhZ2FpbnN0IGEgY29ja2F0cmljZSEi" }, michael@0: { "Death is just life's way of telling you you've been fired.", michael@0: "RGVhdGggaXMganVzdCBsaWZlJ3Mgd2F5IG9mIHRlbGxpbmcgeW91IHlvdSd2ZSBiZWVuIGZpcmVkLg==" }, michael@0: { "Demi-gods don't need any help from the gods.", michael@0: "RGVtaS1nb2RzIGRvbid0IG5lZWQgYW55IGhlbHAgZnJvbSB0aGUgZ29kcy4=" }, michael@0: { "Demons *HATE* Priests and Priestesses.", michael@0: "RGVtb25zICpIQVRFKiBQcmllc3RzIGFuZCBQcmllc3Rlc3Nlcy4=" }, michael@0: { "Didn't you forget to pay?", michael@0: "RGlkbid0IHlvdSBmb3JnZXQgdG8gcGF5Pw==" }, michael@0: { "Didn't your mother tell you not to eat food off the floor?", michael@0: "RGlkbid0IHlvdXIgbW90aGVyIHRlbGwgeW91IG5vdCB0byBlYXQgZm9vZCBvZmYgdGhlIGZsb29yPw==" }, michael@0: { "Direct a direct hit on your direct opponent, directing in the right direction.", michael@0: "RGlyZWN0IGEgZGlyZWN0IGhpdCBvbiB5b3VyIGRpcmVjdCBvcHBvbmVudCwgZGlyZWN0aW5nIGluIHRoZSByaWdodCBkaXJlY3Rpb24u" }, michael@0: { "Do you want to make more money? Sure, we all do! Join the Fort Ludios guard!", michael@0: "RG8geW91IHdhbnQgdG8gbWFrZSBtb3JlIG1vbmV5PyBTdXJlLCB3ZSBhbGwgZG8hIEpvaW4gdGhlIEZvcnQgTHVkaW9zIGd1YXJkIQ==" }, michael@0: { "Don't eat too much: you might start hiccoughing!", michael@0: "RG9uJ3QgZWF0IHRvbyBtdWNoOiB5b3UgbWlnaHQgc3RhcnQgaGljY291Z2hpbmch" }, michael@0: { "Don't play hack at your work; your boss might hit you!", michael@0: "RG9uJ3QgcGxheSBoYWNrIGF0IHlvdXIgd29yazsgeW91ciBib3NzIG1pZ2h0IGhpdCB5b3Uh" }, michael@0: { "Don't tell a soul you found a secret door, otherwise it isn't a secret anymore.", michael@0: "RG9uJ3QgdGVsbCBhIHNvdWwgeW91IGZvdW5kIGEgc2VjcmV0IGRvb3IsIG90aGVyd2lzZSBpdCBpc24ndCBhIHNlY3JldCBhbnltb3JlLg==" }, michael@0: { "Drinking potions of booze may land you in jail if you are under 21.", michael@0: "RHJpbmtpbmcgcG90aW9ucyBvZiBib296ZSBtYXkgbGFuZCB5b3UgaW4gamFpbCBpZiB5b3UgYXJlIHVuZGVyIDIxLg==" }, michael@0: { "Drop your vanity and get rid of your jewels! Pickpockets about!", michael@0: "RHJvcCB5b3VyIHZhbml0eSBhbmQgZ2V0IHJpZCBvZiB5b3VyIGpld2VscyEgUGlja3BvY2tldHMgYWJvdXQh" }, michael@0: { "Eat 10 cloves of garlic and keep all humans at a two-square distance.", michael@0: "RWF0IDEwIGNsb3ZlcyBvZiBnYXJsaWMgYW5kIGtlZXAgYWxsIGh1bWFucyBhdCBhIHR3by1zcXVhcmUgZGlzdGFuY2Uu" }, michael@0: { "Eels hide under mud. Use a unicorn to clear the water and make them visible.", michael@0: "RWVscyBoaWRlIHVuZGVyIG11ZC4gVXNlIGEgdW5pY29ybiB0byBjbGVhciB0aGUgd2F0ZXIgYW5kIG1ha2UgdGhlbSB2aXNpYmxlLg==" }, michael@0: { "Engrave your wishes with a wand of wishing.", michael@0: "RW5ncmF2ZSB5b3VyIHdpc2hlcyB3aXRoIGEgd2FuZCBvZiB3aXNoaW5nLg==" }, michael@0: { "Eventually you will come to admire the swift elegance of a retreating nymph.", michael@0: "RXZlbnR1YWxseSB5b3Ugd2lsbCBjb21lIHRvIGFkbWlyZSB0aGUgc3dpZnQgZWxlZ2FuY2Ugb2YgYSByZXRyZWF0aW5nIG55bXBoLg==" }, michael@0: { "Ever heard hissing outside? I *knew* you hadn't!", michael@0: "RXZlciBoZWFyZCBoaXNzaW5nIG91dHNpZGU/IEkgKmtuZXcqIHlvdSBoYWRuJ3Qh" }, michael@0: { "Ever lifted a dragon corpse?", michael@0: "RXZlciBsaWZ0ZWQgYSBkcmFnb24gY29ycHNlPw==" }, michael@0: { "Ever seen a leocrotta dancing the tengu?", michael@0: "RXZlciBzZWVuIGEgbGVvY3JvdHRhIGRhbmNpbmcgdGhlIHRlbmd1Pw==" }, michael@0: { "Ever seen your weapon glow plaid?", michael@0: "RXZlciBzZWVuIHlvdXIgd2VhcG9uIGdsb3cgcGxhaWQ/" }, michael@0: { "Ever tamed a shopkeeper?", michael@0: "RXZlciB0YW1lZCBhIHNob3BrZWVwZXI/" }, michael@0: { "Ever tried digging through a Vault Guard?", michael@0: "RXZlciB0cmllZCBkaWdnaW5nIHRocm91Z2ggYSBWYXVsdCBHdWFyZD8=" }, michael@0: { "Ever tried enchanting a rope?", michael@0: "RXZlciB0cmllZCBlbmNoYW50aW5nIGEgcm9wZT8=" }, michael@0: { "Floating eyes can't stand Hawaiian shirts.", michael@0: "RmxvYXRpbmcgZXllcyBjYW4ndCBzdGFuZCBIYXdhaWlhbiBzaGlydHMu" }, michael@0: { "For any remedy there is a misery.", michael@0: "Rm9yIGFueSByZW1lZHkgdGhlcmUgaXMgYSBtaXNlcnku" }, michael@0: { "Giant bats turn into giant vampires.", michael@0: "R2lhbnQgYmF0cyB0dXJuIGludG8gZ2lhbnQgdmFtcGlyZXMu" }, michael@0: { "Good day for overcoming obstacles. Try a steeplechase.", michael@0: "R29vZCBkYXkgZm9yIG92ZXJjb21pbmcgb2JzdGFjbGVzLiBUcnkgYSBzdGVlcGxlY2hhc2Uu" }, michael@0: { "Half Moon tonight. (At least it's better than no Moon at all.)", michael@0: "SGFsZiBNb29uIHRvbmlnaHQuIChBdCBsZWFzdCBpdCdzIGJldHRlciB0aGFuIG5vIE1vb24gYXQgYWxsLik=" }, michael@0: { "Help! I'm being held prisoner in a fortune cookie factory!", michael@0: "SGVscCEgSSdtIGJlaW5nIGhlbGQgcHJpc29uZXIgaW4gYSBmb3J0dW5lIGNvb2tpZSBmYWN0b3J5IQ==" }, michael@0: { "Housecats have nine lives, kittens only one.", michael@0: "SG91c2VjYXRzIGhhdmUgbmluZSBsaXZlcywga2l0dGVucyBvbmx5IG9uZS4=" }, michael@0: { "How long can you tread water?", michael@0: "SG93IGxvbmcgY2FuIHlvdSB0cmVhZCB3YXRlcj8=" }, michael@0: { "Hungry? There is an abundance of food on the next level.", michael@0: "SHVuZ3J5PyBUaGVyZSBpcyBhbiBhYnVuZGFuY2Ugb2YgZm9vZCBvbiB0aGUgbmV4dCBsZXZlbC4=" }, michael@0: { "I guess you've never hit a mail daemon with the Amulet of Yendor...", michael@0: "SSBndWVzcyB5b3UndmUgbmV2ZXIgaGl0IGEgbWFpbCBkYWVtb24gd2l0aCB0aGUgQW11bGV0IG9mIFllbmRvci4uLg==" }, michael@0: { "If you are the shopkeeper, you can take things for free.", michael@0: "SWYgeW91IGFyZSB0aGUgc2hvcGtlZXBlciwgeW91IGNhbiB0YWtlIHRoaW5ncyBmb3IgZnJlZS4=" }, michael@0: { "If you can't learn to do it well, learn to enjoy doing it badly.", michael@0: "SWYgeW91IGNhbid0IGxlYXJuIHRvIGRvIGl0IHdlbGwsIGxlYXJuIHRvIGVuam95IGRvaW5nIGl0IGJhZGx5Lg==" }, michael@0: { "If you thought the Wizard was bad, just wait till you meet the Warlord!", michael@0: "SWYgeW91IHRob3VnaHQgdGhlIFdpemFyZCB3YXMgYmFkLCBqdXN0IHdhaXQgdGlsbCB5b3UgbWVldCB0aGUgV2FybG9yZCE=" }, michael@0: { "If you turn blind, don't expect your dog to be turned into a seeing-eye dog.", michael@0: "SWYgeW91IHR1cm4gYmxpbmQsIGRvbid0IGV4cGVjdCB5b3VyIGRvZyB0byBiZSB0dXJuZWQgaW50byBhIHNlZWluZy1leWUgZG9nLg==" }, michael@0: { "If you want to feel great, you must eat something real big.", michael@0: "SWYgeW91IHdhbnQgdG8gZmVlbCBncmVhdCwgeW91IG11c3QgZWF0IHNvbWV0aGluZyByZWFsIGJpZy4=" }, michael@0: { "If you want to float, you'd better eat a floating eye.", michael@0: "SWYgeW91IHdhbnQgdG8gZmxvYXQsIHlvdSdkIGJldHRlciBlYXQgYSBmbG9hdGluZyBleWUu" }, michael@0: { "If your ghost kills a player, it increases your score.", michael@0: "SWYgeW91ciBnaG9zdCBraWxscyBhIHBsYXllciwgaXQgaW5jcmVhc2VzIHlvdXIgc2NvcmUu" }, michael@0: { "Increase mindpower: Tame your own ghost!", michael@0: "SW5jcmVhc2UgbWluZHBvd2VyOiBUYW1lIHlvdXIgb3duIGdob3N0IQ==" }, michael@0: { "It furthers one to see the great man.", michael@0: "SXQgZnVydGhlcnMgb25lIHRvIHNlZSB0aGUgZ3JlYXQgbWFuLg==" }, michael@0: { "It's easy to overlook a monster in a wood.", michael@0: "SXQncyBlYXN5IHRvIG92ZXJsb29rIGEgbW9uc3RlciBpbiBhIHdvb2Qu" }, michael@0: { "Just below any trapdoor there may be another one. Just keep falling!", michael@0: "SnVzdCBiZWxvdyBhbnkgdHJhcGRvb3IgdGhlcmUgbWF5IGJlIGFub3RoZXIgb25lLiBKdXN0IGtlZXAgZmFsbGluZyE=" }, michael@0: { "Katanas are very sharp; watch you don't cut yourself.", michael@0: "S2F0YW5hcyBhcmUgdmVyeSBzaGFycDsgd2F0Y2ggeW91IGRvbid0IGN1dCB5b3Vyc2VsZi4=" }, michael@0: { "Keep a clear mind: quaff clear potions.", michael@0: "S2VlcCBhIGNsZWFyIG1pbmQ6IHF1YWZmIGNsZWFyIHBvdGlvbnMu" }, michael@0: { "Kicking the terminal doesn't hurt the monsters.", michael@0: "S2lja2luZyB0aGUgdGVybWluYWwgZG9lc24ndCBodXJ0IHRoZSBtb25zdGVycy4=" }, michael@0: { "Killer bees keep appearing till you kill their queen.", michael@0: "S2lsbGVyIGJlZXMga2VlcCBhcHBlYXJpbmcgdGlsbCB5b3Uga2lsbCB0aGVpciBxdWVlbi4=" }, michael@0: { "Killer bunnies can be tamed with carrots only.", michael@0: "S2lsbGVyIGJ1bm5pZXMgY2FuIGJlIHRhbWVkIHdpdGggY2Fycm90cyBvbmx5Lg==" }, michael@0: { "Latest news? Put `rec.games.roguelike.nethack' in your .newsrc!", michael@0: "TGF0ZXN0IG5ld3M/IFB1dCBgcmVjLmdhbWVzLnJvZ3VlbGlrZS5uZXRoYWNrJyBpbiB5b3VyIC5uZXdzcmMh" }, michael@0: { "Learn how to spell. Play NetHack!", michael@0: "TGVhcm4gaG93IHRvIHNwZWxsLiBQbGF5IE5ldEhhY2sh" }, michael@0: { "Leprechauns hide their gold in a secret room.", michael@0: "TGVwcmVjaGF1bnMgaGlkZSB0aGVpciBnb2xkIGluIGEgc2VjcmV0IHJvb20u" }, michael@0: { "Let your fingers do the walking on the yulkjhnb keys.", michael@0: "TGV0IHlvdXIgZmluZ2VycyBkbyB0aGUgd2Fsa2luZyBvbiB0aGUgeXVsa2pobmIga2V5cy4=" }, michael@0: { "Let's face it: this time you're not going to win.", michael@0: "TGV0J3MgZmFjZSBpdDogdGhpcyB0aW1lIHlvdSdyZSBub3QgZ29pbmcgdG8gd2luLg==" }, michael@0: { "Let's have a party, drink a lot of booze.", michael@0: "TGV0J3MgaGF2ZSBhIHBhcnR5LCBkcmluayBhIGxvdCBvZiBib296ZS4=" }, michael@0: { "Liquor sellers do not drink; they hate to see you twice.", michael@0: "TGlxdW9yIHNlbGxlcnMgZG8gbm90IGRyaW5rOyB0aGV5IGhhdGUgdG8gc2VlIHlvdSB0d2ljZS4=" }, michael@0: { "Lunar eclipse tonight. May as well quit now!", michael@0: "THVuYXIgZWNsaXBzZSB0b25pZ2h0LiBNYXkgYXMgd2VsbCBxdWl0IG5vdyE=" }, michael@0: { "Meeting your own ghost decreases your luck considerably!", michael@0: "TWVldGluZyB5b3VyIG93biBnaG9zdCBkZWNyZWFzZXMgeW91ciBsdWNrIGNvbnNpZGVyYWJseSE=" }, michael@0: { "Money to invest? Take it to the local branch of the Magic Memory Vault!", michael@0: "TW9uZXkgdG8gaW52ZXN0PyBUYWtlIGl0IHRvIHRoZSBsb2NhbCBicmFuY2ggb2YgdGhlIE1hZ2ljIE1lbW9yeSBWYXVsdCE=" }, michael@0: { "Monsters come from nowhere to hit you everywhere.", michael@0: "TW9uc3RlcnMgY29tZSBmcm9tIG5vd2hlcmUgdG8gaGl0IHlvdSBldmVyeXdoZXJlLg==" }, michael@0: { "Monsters sleep because you are boring, not because they ever get tired.", michael@0: "TW9uc3RlcnMgc2xlZXAgYmVjYXVzZSB5b3UgYXJlIGJvcmluZywgbm90IGJlY2F1c2UgdGhleSBldmVyIGdldCB0aXJlZC4=" }, michael@0: { "Most monsters prefer minced meat. That's why they are hitting you!", michael@0: "TW9zdCBtb25zdGVycyBwcmVmZXIgbWluY2VkIG1lYXQuIFRoYXQncyB3aHkgdGhleSBhcmUgaGl0dGluZyB5b3Uh" }, michael@0: { "Most of the bugs in NetHack are on the floor.", michael@0: "TW9zdCBvZiB0aGUgYnVncyBpbiBOZXRIYWNrIGFyZSBvbiB0aGUgZmxvb3Iu" }, michael@0: { "Much ado Nothing Happens.", michael@0: "TXVjaCBhZG8gTm90aGluZyBIYXBwZW5zLg==" }, michael@0: { "Multi-player NetHack is a myth.", michael@0: "TXVsdGktcGxheWVyIE5ldEhhY2sgaXMgYSBteXRoLg==" }, michael@0: { "NetHack is addictive. Too late, you're already hooked.", michael@0: "TmV0SGFjayBpcyBhZGRpY3RpdmUuIFRvbyBsYXRlLCB5b3UncmUgYWxyZWFkeSBob29rZWQu" }, michael@0: { "Never ask a shopkeeper for a price list.", michael@0: "TmV2ZXIgYXNrIGEgc2hvcGtlZXBlciBmb3IgYSBwcmljZSBsaXN0Lg==" }, michael@0: { "Never burn a tree, unless you like getting whacked with a +5 shovel.", michael@0: "TmV2ZXIgYnVybiBhIHRyZWUsIHVubGVzcyB5b3UgbGlrZSBnZXR0aW5nIHdoYWNrZWQgd2l0aCBhICs1IHNob3ZlbC4=" }, michael@0: { "Never eat with glowing hands!", michael@0: "TmV2ZXIgZWF0IHdpdGggZ2xvd2luZyBoYW5kcyE=" }, michael@0: { "Never mind the monsters hitting you: they just replace the charwomen.", michael@0: "TmV2ZXIgbWluZCB0aGUgbW9uc3RlcnMgaGl0dGluZyB5b3U6IHRoZXkganVzdCByZXBsYWNlIHRoZSBjaGFyd29tZW4u" }, michael@0: { "Never play leapfrog with a unicorn.", michael@0: "TmV2ZXIgcGxheSBsZWFwZnJvZyB3aXRoIGEgdW5pY29ybi4=" }, michael@0: { "Never step on a cursed engraving.", michael@0: "TmV2ZXIgc3RlcCBvbiBhIGN1cnNlZCBlbmdyYXZpbmcu" }, michael@0: { "Never swim with a camera: there's nothing to take pictures of.", michael@0: "TmV2ZXIgc3dpbSB3aXRoIGEgY2FtZXJhOiB0aGVyZSdzIG5vdGhpbmcgdG8gdGFrZSBwaWN0dXJlcyBvZi4=" }, michael@0: { "Never teach your pet rust monster to fetch.", michael@0: "TmV2ZXIgdGVhY2ggeW91ciBwZXQgcnVzdCBtb25zdGVyIHRvIGZldGNoLg==" }, michael@0: { "Never trust a random generator in magic fields.", michael@0: "TmV2ZXIgdHJ1c3QgYSByYW5kb20gZ2VuZXJhdG9yIGluIG1hZ2ljIGZpZWxkcy4=" }, michael@0: { "Never use a wand of death.", michael@0: "TmV2ZXIgdXNlIGEgd2FuZCBvZiBkZWF0aC4=" }, michael@0: { "No level contains two shops. The maze is no level. So...", michael@0: "Tm8gbGV2ZWwgY29udGFpbnMgdHdvIHNob3BzLiBUaGUgbWF6ZSBpcyBubyBsZXZlbC4gU28uLi4=" }, michael@0: { "No part of this fortune may be reproduced, stored in a retrieval system, ...", michael@0: "Tm8gcGFydCBvZiB0aGlzIGZvcnR1bmUgbWF5IGJlIHJlcHJvZHVjZWQsIHN0b3JlZCBpbiBhIHJldHJpZXZhbCBzeXN0ZW0sIC4uLg==" }, michael@0: { "Not all rumors are as misleading as this one.", michael@0: "Tm90IGFsbCBydW1vcnMgYXJlIGFzIG1pc2xlYWRpbmcgYXMgdGhpcyBvbmUu" }, michael@0: { "Nymphs and nurses like beautiful rings.", michael@0: "TnltcGhzIGFuZCBudXJzZXMgbGlrZSBiZWF1dGlmdWwgcmluZ3Mu" }, michael@0: { "Nymphs are blondes. Are you a gentleman?", michael@0: "TnltcGhzIGFyZSBibG9uZGVzLiBBcmUgeW91IGEgZ2VudGxlbWFuPw==" }, michael@0: { "Offering a unicorn a worthless piece of glass might prove to be fatal!", michael@0: "T2ZmZXJpbmcgYSB1bmljb3JuIGEgd29ydGhsZXNzIHBpZWNlIG9mIGdsYXNzIG1pZ2h0IHByb3ZlIHRvIGJlIGZhdGFsIQ==" }, michael@0: { "Old hackers never die: young ones do.", michael@0: "T2xkIGhhY2tlcnMgbmV2ZXIgZGllOiB5b3VuZyBvbmVzIGRvLg==" }, michael@0: { "One has to leave shops before closing time.", michael@0: "T25lIGhhcyB0byBsZWF2ZSBzaG9wcyBiZWZvcmUgY2xvc2luZyB0aW1lLg==" }, michael@0: { "One homunculus a day keeps the doctor away.", michael@0: "T25lIGhvbXVuY3VsdXMgYSBkYXkga2VlcHMgdGhlIGRvY3RvciBhd2F5Lg==" }, michael@0: { "One level further down somebody is getting killed, right now.", michael@0: "T25lIGxldmVsIGZ1cnRoZXIgZG93biBzb21lYm9keSBpcyBnZXR0aW5nIGtpbGxlZCwgcmlnaHQgbm93Lg==" }, michael@0: { "Only a wizard can use a magic whistle.", michael@0: "T25seSBhIHdpemFyZCBjYW4gdXNlIGEgbWFnaWMgd2hpc3RsZS4=" }, michael@0: { "Only adventurers of evil alignment think of killing their dog.", michael@0: "T25seSBhZHZlbnR1cmVycyBvZiBldmlsIGFsaWdubWVudCB0aGluayBvZiBraWxsaW5nIHRoZWlyIGRvZy4=" }, michael@0: { "Only chaotic evils kill sleeping monsters.", michael@0: "T25seSBjaGFvdGljIGV2aWxzIGtpbGwgc2xlZXBpbmcgbW9uc3RlcnMu" }, michael@0: { "Only real trappers escape traps.", michael@0: "T25seSByZWFsIHRyYXBwZXJzIGVzY2FwZSB0cmFwcy4=" }, michael@0: { "Only real wizards can write scrolls.", michael@0: "T25seSByZWFsIHdpemFyZHMgY2FuIHdyaXRlIHNjcm9sbHMu" }, michael@0: { "Operation OVERKILL has started now.", michael@0: "T3BlcmF0aW9uIE9WRVJLSUxMIGhhcyBzdGFydGVkIG5vdy4=" }, michael@0: { "PLEASE ignore previous rumor.", michael@0: "UExFQVNFIGlnbm9yZSBwcmV2aW91cyBydW1vci4=" }, michael@0: { "Polymorph into an ettin; meet your opponents face to face to face.", michael@0: "UG9seW1vcnBoIGludG8gYW4gZXR0aW47IG1lZXQgeW91ciBvcHBvbmVudHMgZmFjZSB0byBmYWNlIHRvIGZhY2Uu" }, michael@0: { "Praying will frighten demons.", michael@0: "UHJheWluZyB3aWxsIGZyaWdodGVuIGRlbW9ucy4=" }, michael@0: { "Row (3x) that boat gently down the stream, Charon (4x), death is but a dream.", michael@0: "Um93ICgzeCkgdGhhdCBib2F0IGdlbnRseSBkb3duIHRoZSBzdHJlYW0sIENoYXJvbiAoNHgpLCBkZWF0aCBpcyBidXQgYSBkcmVhbS4=" }, michael@0: { "Running is good for your legs.", michael@0: "UnVubmluZyBpcyBnb29kIGZvciB5b3VyIGxlZ3Mu" }, michael@0: { "Screw up your courage! You've screwed up everything else.", michael@0: "U2NyZXcgdXAgeW91ciBjb3VyYWdlISBZb3UndmUgc2NyZXdlZCB1cCBldmVyeXRoaW5nIGVsc2Uu" }, michael@0: { "Seepage? Leaky pipes? Rising damp? Summon the plumber!", michael@0: "U2VlcGFnZT8gTGVha3kgcGlwZXM/IFJpc2luZyBkYW1wPyBTdW1tb24gdGhlIHBsdW1iZXIh" }, michael@0: { "Segmentation fault (core dumped).", michael@0: "U2VnbWVudGF0aW9uIGZhdWx0IChjb3JlIGR1bXBlZCku" }, michael@0: { "Shopkeepers sometimes die from old age.", michael@0: "U2hvcGtlZXBlcnMgc29tZXRpbWVzIGRpZSBmcm9tIG9sZCBhZ2Uu" }, michael@0: { "Some mazes (especially small ones) have no solutions, says man 6 maze.", michael@0: "U29tZSBtYXplcyAoZXNwZWNpYWxseSBzbWFsbCBvbmVzKSBoYXZlIG5vIHNvbHV0aW9ucywgc2F5cyBtYW4gNiBtYXplLg==" }, michael@0: { "Some questions the Sphynx asks just *don't* have any answers.", michael@0: "U29tZSBxdWVzdGlvbnMgdGhlIFNwaHlueCBhc2tzIGp1c3QgKmRvbid0KiBoYXZlIGFueSBhbnN3ZXJzLg==" }, michael@0: { "Sometimes \"mu\" is the answer.", michael@0: "U29tZXRpbWVzICJtdSIgaXMgdGhlIGFuc3dlci4=" }, michael@0: { "Sorry, no fortune this time. Better luck next cookie!", michael@0: "U29ycnksIG5vIGZvcnR1bmUgdGhpcyB0aW1lLiBCZXR0ZXIgbHVjayBuZXh0IGNvb2tpZSE=" }, michael@0: { "Spare your scrolls of make-edible until it's really necessary!", michael@0: "U3BhcmUgeW91ciBzY3JvbGxzIG9mIG1ha2UtZWRpYmxlIHVudGlsIGl0J3MgcmVhbGx5IG5lY2Vzc2FyeSE=" }, michael@0: { "Suddenly, the dungeon will collapse...", michael@0: "U3VkZGVubHksIHRoZSBkdW5nZW9uIHdpbGwgY29sbGFwc2UuLi4=" }, michael@0: { "Taming a mail daemon may cause a system security violation.", michael@0: "VGFtaW5nIGEgbWFpbCBkYWVtb24gbWF5IGNhdXNlIGEgc3lzdGVtIHNlY3VyaXR5IHZpb2xhdGlvbi4=" }, michael@0: { "The crowd was so tough, the Stooges won't play the Dungeon anymore, nyuk nyuk.", michael@0: "VGhlIGNyb3dkIHdhcyBzbyB0b3VnaCwgdGhlIFN0b29nZXMgd29uJ3QgcGxheSB0aGUgRHVuZ2VvbiBhbnltb3JlLCBueXVrIG55dWsu" }, michael@0: { "The leprechauns hide their treasure in a small hidden room.", michael@0: "VGhlIGxlcHJlY2hhdW5zIGhpZGUgdGhlaXIgdHJlYXN1cmUgaW4gYSBzbWFsbCBoaWRkZW4gcm9vbS4=" }, michael@0: { "The longer the wand the better.", michael@0: "VGhlIGxvbmdlciB0aGUgd2FuZCB0aGUgYmV0dGVyLg==" }, michael@0: { "The magic word is \"XYZZY\".", michael@0: "VGhlIG1hZ2ljIHdvcmQgaXMgIlhZWlpZIi4=" }, michael@0: { "The meek shall inherit your bones files.", michael@0: "VGhlIG1lZWsgc2hhbGwgaW5oZXJpdCB5b3VyIGJvbmVzIGZpbGVzLg==" }, michael@0: { "The mines are dark and deep, and I have levels to go before I sleep.", michael@0: "VGhlIG1pbmVzIGFyZSBkYXJrIGFuZCBkZWVwLCBhbmQgSSBoYXZlIGxldmVscyB0byBnbyBiZWZvcmUgSSBzbGVlcC4=" }, michael@0: { "The use of dynamite is dangerous.", michael@0: "VGhlIHVzZSBvZiBkeW5hbWl0ZSBpcyBkYW5nZXJvdXMu" }, michael@0: { "There are no worms in the UNIX version.", michael@0: "VGhlcmUgYXJlIG5vIHdvcm1zIGluIHRoZSBVTklYIHZlcnNpb24u" }, michael@0: { "There is a trap on this level!", michael@0: "VGhlcmUgaXMgYSB0cmFwIG9uIHRoaXMgbGV2ZWwh" }, michael@0: { "They say that Demogorgon, Asmodeus, Orcus, Yeenoghu & Juiblex is no law firm.", michael@0: "VGhleSBzYXkgdGhhdCBEZW1vZ29yZ29uLCBBc21vZGV1cywgT3JjdXMsIFllZW5vZ2h1ICYgSnVpYmxleCBpcyBubyBsYXcgZmlybS4=" }, michael@0: { "They say that Geryon has an evil twin, beware!", michael@0: "VGhleSBzYXkgdGhhdCBHZXJ5b24gaGFzIGFuIGV2aWwgdHdpbiwgYmV3YXJlIQ==" }, michael@0: { "They say that Medusa would make a terrible pet.", michael@0: "VGhleSBzYXkgdGhhdCBNZWR1c2Egd291bGQgbWFrZSBhIHRlcnJpYmxlIHBldC4=" }, michael@0: { "They say that NetHack bugs are Seldon planned.", michael@0: "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGJ1Z3MgYXJlIFNlbGRvbiBwbGFubmVkLg==" }, michael@0: { "They say that NetHack comes in 256 flavors.", michael@0: "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGNvbWVzIGluIDI1NiBmbGF2b3JzLg==" }, michael@0: { "They say that NetHack is just a computer game.", michael@0: "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIGp1c3QgYSBjb21wdXRlciBnYW1lLg==" }, michael@0: { "They say that NetHack is more than just a computer game.", michael@0: "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIG1vcmUgdGhhbiBqdXN0IGEgY29tcHV0ZXIgZ2FtZS4=" }, michael@0: { "They say that NetHack is never what it used to be.", michael@0: "VGhleSBzYXkgdGhhdCBOZXRIYWNrIGlzIG5ldmVyIHdoYXQgaXQgdXNlZCB0byBiZS4=" }, michael@0: { "They say that a baby dragon is too small to hurt or help you.", michael@0: "VGhleSBzYXkgdGhhdCBhIGJhYnkgZHJhZ29uIGlzIHRvbyBzbWFsbCB0byBodXJ0IG9yIGhlbHAgeW91Lg==" }, michael@0: { "They say that a black pudding is simply a brown pudding gone bad.", michael@0: "VGhleSBzYXkgdGhhdCBhIGJsYWNrIHB1ZGRpbmcgaXMgc2ltcGx5IGEgYnJvd24gcHVkZGluZyBnb25lIGJhZC4=" }, michael@0: { "They say that a black sheep has 3 bags full of wool.", michael@0: "VGhleSBzYXkgdGhhdCBhIGJsYWNrIHNoZWVwIGhhcyAzIGJhZ3MgZnVsbCBvZiB3b29sLg==" }, michael@0: { "They say that a blank scroll is like a blank check.", michael@0: "VGhleSBzYXkgdGhhdCBhIGJsYW5rIHNjcm9sbCBpcyBsaWtlIGEgYmxhbmsgY2hlY2su" }, michael@0: { "They say that a cat named Morris has nine lives.", michael@0: "VGhleSBzYXkgdGhhdCBhIGNhdCBuYW1lZCBNb3JyaXMgaGFzIG5pbmUgbGl2ZXMu" }, michael@0: { "They say that a desperate shopper might pay any price in a shop.", michael@0: "VGhleSBzYXkgdGhhdCBhIGRlc3BlcmF0ZSBzaG9wcGVyIG1pZ2h0IHBheSBhbnkgcHJpY2UgaW4gYSBzaG9wLg==" }, michael@0: { "They say that a diamond dog is everybody's best friend.", michael@0: "VGhleSBzYXkgdGhhdCBhIGRpYW1vbmQgZG9nIGlzIGV2ZXJ5Ym9keSdzIGJlc3QgZnJpZW5kLg==" }, michael@0: { "They say that a dwarf lord can carry a pick-axe because his armor is light.", michael@0: "VGhleSBzYXkgdGhhdCBhIGR3YXJmIGxvcmQgY2FuIGNhcnJ5IGEgcGljay1heGUgYmVjYXVzZSBoaXMgYXJtb3IgaXMgbGlnaHQu" }, michael@0: { "They say that a floating eye can defeat Medusa.", michael@0: "VGhleSBzYXkgdGhhdCBhIGZsb2F0aW5nIGV5ZSBjYW4gZGVmZWF0IE1lZHVzYS4=" }, michael@0: { "They say that a fortune only has 1 line and you can't read between it.", michael@0: "VGhleSBzYXkgdGhhdCBhIGZvcnR1bmUgb25seSBoYXMgMSBsaW5lIGFuZCB5b3UgY2FuJ3QgcmVhZCBiZXR3ZWVuIGl0Lg==" }, michael@0: { "They say that a fortune only has 1 line, but you can read between it.", michael@0: "VGhleSBzYXkgdGhhdCBhIGZvcnR1bmUgb25seSBoYXMgMSBsaW5lLCBidXQgeW91IGNhbiByZWFkIGJldHdlZW4gaXQu" }, michael@0: { "They say that a fountain looks nothing like a regularly erupting geyser.", michael@0: "VGhleSBzYXkgdGhhdCBhIGZvdW50YWluIGxvb2tzIG5vdGhpbmcgbGlrZSBhIHJlZ3VsYXJseSBlcnVwdGluZyBnZXlzZXIu" }, michael@0: { "They say that a gold doubloon is worth more than its weight in gold.", michael@0: "VGhleSBzYXkgdGhhdCBhIGdvbGQgZG91Ymxvb24gaXMgd29ydGggbW9yZSB0aGFuIGl0cyB3ZWlnaHQgaW4gZ29sZC4=" }, michael@0: { "They say that a grid bug won't pay a shopkeeper for zapping you in a shop.", michael@0: "VGhleSBzYXkgdGhhdCBhIGdyaWQgYnVnIHdvbid0IHBheSBhIHNob3BrZWVwZXIgZm9yIHphcHBpbmcgeW91IGluIGEgc2hvcC4=" }, michael@0: { "They say that a gypsy could tell your fortune for a price.", michael@0: "VGhleSBzYXkgdGhhdCBhIGd5cHN5IGNvdWxkIHRlbGwgeW91ciBmb3J0dW5lIGZvciBhIHByaWNlLg==" }, michael@0: { "They say that a hacker named Alice once level teleported by using a mirror.", michael@0: "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBBbGljZSBvbmNlIGxldmVsIHRlbGVwb3J0ZWQgYnkgdXNpbmcgYSBtaXJyb3Iu" }, michael@0: { "They say that a hacker named David once slew a giant with a sling and a rock.", michael@0: "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBEYXZpZCBvbmNlIHNsZXcgYSBnaWFudCB3aXRoIGEgc2xpbmcgYW5kIGEgcm9jay4=" }, michael@0: { "They say that a hacker named Dorothy once rode a fog cloud to Oz.", michael@0: "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBEb3JvdGh5IG9uY2Ugcm9kZSBhIGZvZyBjbG91ZCB0byBPei4=" }, michael@0: { "They say that a hacker named Mary once lost a white sheep in the mazes.", michael@0: "VGhleSBzYXkgdGhhdCBhIGhhY2tlciBuYW1lZCBNYXJ5IG9uY2UgbG9zdCBhIHdoaXRlIHNoZWVwIGluIHRoZSBtYXplcy4=" }, michael@0: { "They say that a helm of brilliance is not to be taken lightly.", michael@0: "VGhleSBzYXkgdGhhdCBhIGhlbG0gb2YgYnJpbGxpYW5jZSBpcyBub3QgdG8gYmUgdGFrZW4gbGlnaHRseS4=" }, michael@0: { "They say that a hot dog and a hell hound are the same thing.", michael@0: "VGhleSBzYXkgdGhhdCBhIGhvdCBkb2cgYW5kIGEgaGVsbCBob3VuZCBhcmUgdGhlIHNhbWUgdGhpbmcu" }, michael@0: { "They say that a lamp named Aladdin's Lamp contains a djinni with 3 wishes.", michael@0: "VGhleSBzYXkgdGhhdCBhIGxhbXAgbmFtZWQgQWxhZGRpbidzIExhbXAgY29udGFpbnMgYSBkamlubmkgd2l0aCAzIHdpc2hlcy4=" }, michael@0: { "They say that a large dog named Lassie will lead you to the amulet.", michael@0: "VGhleSBzYXkgdGhhdCBhIGxhcmdlIGRvZyBuYW1lZCBMYXNzaWUgd2lsbCBsZWFkIHlvdSB0byB0aGUgYW11bGV0Lg==" }, michael@0: { "They say that a long sword is not a light sword.", michael@0: "VGhleSBzYXkgdGhhdCBhIGxvbmcgc3dvcmQgaXMgbm90IGEgbGlnaHQgc3dvcmQu" }, michael@0: { "They say that a manes won't mince words with you.", michael@0: "VGhleSBzYXkgdGhhdCBhIG1hbmVzIHdvbid0IG1pbmNlIHdvcmRzIHdpdGggeW91Lg==" }, michael@0: { "They say that a mind is a terrible thing to waste.", michael@0: "VGhleSBzYXkgdGhhdCBhIG1pbmQgaXMgYSB0ZXJyaWJsZSB0aGluZyB0byB3YXN0ZS4=" }, michael@0: { "They say that a plain nymph will only wear a wire ring in one ear.", michael@0: "VGhleSBzYXkgdGhhdCBhIHBsYWluIG55bXBoIHdpbGwgb25seSB3ZWFyIGEgd2lyZSByaW5nIGluIG9uZSBlYXIu" }, michael@0: { "They say that a plumed hat could be a previously used crested helmet.", michael@0: "VGhleSBzYXkgdGhhdCBhIHBsdW1lZCBoYXQgY291bGQgYmUgYSBwcmV2aW91c2x5IHVzZWQgY3Jlc3RlZCBoZWxtZXQu" }, michael@0: { "They say that a potion of oil is difficult to grasp.", michael@0: "VGhleSBzYXkgdGhhdCBhIHBvdGlvbiBvZiBvaWwgaXMgZGlmZmljdWx0IHRvIGdyYXNwLg==" }, michael@0: { "They say that a potion of yogurt is a cancelled potion of sickness.", michael@0: "VGhleSBzYXkgdGhhdCBhIHBvdGlvbiBvZiB5b2d1cnQgaXMgYSBjYW5jZWxsZWQgcG90aW9uIG9mIHNpY2tuZXNzLg==" }, michael@0: { "They say that a purple worm is not a baby purple dragon.", michael@0: "VGhleSBzYXkgdGhhdCBhIHB1cnBsZSB3b3JtIGlzIG5vdCBhIGJhYnkgcHVycGxlIGRyYWdvbi4=" }, michael@0: { "They say that a quivering blob tastes different than a gelatinous cube.", michael@0: "VGhleSBzYXkgdGhhdCBhIHF1aXZlcmluZyBibG9iIHRhc3RlcyBkaWZmZXJlbnQgdGhhbiBhIGdlbGF0aW5vdXMgY3ViZS4=" }, michael@0: { "They say that a runed broadsword named Stormbringer attracts vortices.", michael@0: "VGhleSBzYXkgdGhhdCBhIHJ1bmVkIGJyb2Fkc3dvcmQgbmFtZWQgU3Rvcm1icmluZ2VyIGF0dHJhY3RzIHZvcnRpY2VzLg==" }, michael@0: { "They say that a scroll of summoning has other names.", michael@0: "VGhleSBzYXkgdGhhdCBhIHNjcm9sbCBvZiBzdW1tb25pbmcgaGFzIG90aGVyIG5hbWVzLg==" }, michael@0: { "They say that a shaman can bestow blessings but usually doesn't.", michael@0: "VGhleSBzYXkgdGhhdCBhIHNoYW1hbiBjYW4gYmVzdG93IGJsZXNzaW5ncyBidXQgdXN1YWxseSBkb2Vzbid0Lg==" }, michael@0: { "They say that a shaman will bless you for an eye of newt and wing of bat.", michael@0: "VGhleSBzYXkgdGhhdCBhIHNoYW1hbiB3aWxsIGJsZXNzIHlvdSBmb3IgYW4gZXllIG9mIG5ld3QgYW5kIHdpbmcgb2YgYmF0Lg==" }, michael@0: { "They say that a shimmering gold shield is not a polished silver shield.", michael@0: "VGhleSBzYXkgdGhhdCBhIHNoaW1tZXJpbmcgZ29sZCBzaGllbGQgaXMgbm90IGEgcG9saXNoZWQgc2lsdmVyIHNoaWVsZC4=" }, michael@0: { "They say that a spear will hit a neo-otyugh. (Do YOU know what that is?)", michael@0: "VGhleSBzYXkgdGhhdCBhIHNwZWFyIHdpbGwgaGl0IGEgbmVvLW90eXVnaC4gKERvIFlPVSBrbm93IHdoYXQgdGhhdCBpcz8p" }, michael@0: { "They say that a spotted dragon is the ultimate shape changer.", michael@0: "VGhleSBzYXkgdGhhdCBhIHNwb3R0ZWQgZHJhZ29uIGlzIHRoZSB1bHRpbWF0ZSBzaGFwZSBjaGFuZ2VyLg==" }, michael@0: { "They say that a stethoscope is no good if you can only hear your heartbeat.", michael@0: "VGhleSBzYXkgdGhhdCBhIHN0ZXRob3Njb3BlIGlzIG5vIGdvb2QgaWYgeW91IGNhbiBvbmx5IGhlYXIgeW91ciBoZWFydGJlYXQu" }, michael@0: { "They say that a succubus named Suzy will sometimes warn you of danger.", michael@0: "VGhleSBzYXkgdGhhdCBhIHN1Y2N1YnVzIG5hbWVkIFN1enkgd2lsbCBzb21ldGltZXMgd2FybiB5b3Ugb2YgZGFuZ2VyLg==" }, michael@0: { "They say that a wand of cancellation is not like a wand of polymorph.", michael@0: "VGhleSBzYXkgdGhhdCBhIHdhbmQgb2YgY2FuY2VsbGF0aW9uIGlzIG5vdCBsaWtlIGEgd2FuZCBvZiBwb2x5bW9ycGgu" }, michael@0: { "They say that a wood golem named Pinocchio would be easy to control.", michael@0: "VGhleSBzYXkgdGhhdCBhIHdvb2QgZ29sZW0gbmFtZWQgUGlub2NjaGlvIHdvdWxkIGJlIGVhc3kgdG8gY29udHJvbC4=" }, michael@0: { "They say that after killing a dragon it's time for a change of scenery.", michael@0: "VGhleSBzYXkgdGhhdCBhZnRlciBraWxsaW5nIGEgZHJhZ29uIGl0J3MgdGltZSBmb3IgYSBjaGFuZ2Ugb2Ygc2NlbmVyeS4=" }, michael@0: { "They say that an amulet of strangulation is worse than ring around the collar.", michael@0: "VGhleSBzYXkgdGhhdCBhbiBhbXVsZXQgb2Ygc3RyYW5ndWxhdGlvbiBpcyB3b3JzZSB0aGFuIHJpbmcgYXJvdW5kIHRoZSBjb2xsYXIu" }, michael@0: { "They say that an attic is the best place to hide your toys.", michael@0: "VGhleSBzYXkgdGhhdCBhbiBhdHRpYyBpcyB0aGUgYmVzdCBwbGFjZSB0byBoaWRlIHlvdXIgdG95cy4=" }, michael@0: { "They say that an axe named Cleaver once belonged to a hacker named Beaver.", michael@0: "VGhleSBzYXkgdGhhdCBhbiBheGUgbmFtZWQgQ2xlYXZlciBvbmNlIGJlbG9uZ2VkIHRvIGEgaGFja2VyIG5hbWVkIEJlYXZlci4=" }, michael@0: { "They say that an eye of newt and a wing of bat are double the trouble.", michael@0: "VGhleSBzYXkgdGhhdCBhbiBleWUgb2YgbmV3dCBhbmQgYSB3aW5nIG9mIGJhdCBhcmUgZG91YmxlIHRoZSB0cm91YmxlLg==" }, michael@0: { "They say that an incubus named Izzy sometimes makes women feel sensitive.", michael@0: "VGhleSBzYXkgdGhhdCBhbiBpbmN1YnVzIG5hbWVkIEl6enkgc29tZXRpbWVzIG1ha2VzIHdvbWVuIGZlZWwgc2Vuc2l0aXZlLg==" }, michael@0: { "They say that an opulent throne room is rarely a place to wish you'd be in.", michael@0: "VGhleSBzYXkgdGhhdCBhbiBvcHVsZW50IHRocm9uZSByb29tIGlzIHJhcmVseSBhIHBsYWNlIHRvIHdpc2ggeW91J2QgYmUgaW4u" }, michael@0: { "They say that an unlucky hacker once had a nose bleed at an altar and died.", michael@0: "VGhleSBzYXkgdGhhdCBhbiB1bmx1Y2t5IGhhY2tlciBvbmNlIGhhZCBhIG5vc2UgYmxlZWQgYXQgYW4gYWx0YXIgYW5kIGRpZWQu" }, michael@0: { "They say that and they say this but they never say never, never!", michael@0: "VGhleSBzYXkgdGhhdCBhbmQgdGhleSBzYXkgdGhpcyBidXQgdGhleSBuZXZlciBzYXkgbmV2ZXIsIG5ldmVyIQ==" }, michael@0: { "They say that any quantum mechanic knows that speed kills.", michael@0: "VGhleSBzYXkgdGhhdCBhbnkgcXVhbnR1bSBtZWNoYW5pYyBrbm93cyB0aGF0IHNwZWVkIGtpbGxzLg==" }, michael@0: { "They say that applying a unicorn horn means you've missed the point.", michael@0: "VGhleSBzYXkgdGhhdCBhcHBseWluZyBhIHVuaWNvcm4gaG9ybiBtZWFucyB5b3UndmUgbWlzc2VkIHRoZSBwb2ludC4=" }, michael@0: { "They say that blue stones are radioactive, beware.", michael@0: "VGhleSBzYXkgdGhhdCBibHVlIHN0b25lcyBhcmUgcmFkaW9hY3RpdmUsIGJld2FyZS4=" }, michael@0: { "They say that building a dungeon is a team effort.", michael@0: "VGhleSBzYXkgdGhhdCBidWlsZGluZyBhIGR1bmdlb24gaXMgYSB0ZWFtIGVmZm9ydC4=" }, michael@0: { "They say that chaotic characters never get a kick out of altars.", michael@0: "VGhleSBzYXkgdGhhdCBjaGFvdGljIGNoYXJhY3RlcnMgbmV2ZXIgZ2V0IGEga2ljayBvdXQgb2YgYWx0YXJzLg==" }, michael@0: { "They say that collapsing a dungeon often creates a panic.", michael@0: "VGhleSBzYXkgdGhhdCBjb2xsYXBzaW5nIGEgZHVuZ2VvbiBvZnRlbiBjcmVhdGVzIGEgcGFuaWMu" }, michael@0: { "They say that counting your eggs before they hatch shows that you care.", michael@0: "VGhleSBzYXkgdGhhdCBjb3VudGluZyB5b3VyIGVnZ3MgYmVmb3JlIHRoZXkgaGF0Y2ggc2hvd3MgdGhhdCB5b3UgY2FyZS4=" }, michael@0: { "They say that dipping a bag of tricks in a fountain won't make it an icebox.", michael@0: "VGhleSBzYXkgdGhhdCBkaXBwaW5nIGEgYmFnIG9mIHRyaWNrcyBpbiBhIGZvdW50YWluIHdvbid0IG1ha2UgaXQgYW4gaWNlYm94Lg==" }, michael@0: { "They say that dipping an eel and brown mold in hot water makes bouillabaisse.", michael@0: "VGhleSBzYXkgdGhhdCBkaXBwaW5nIGFuIGVlbCBhbmQgYnJvd24gbW9sZCBpbiBob3Qgd2F0ZXIgbWFrZXMgYm91aWxsYWJhaXNzZS4=" }, michael@0: { "They say that donating a doubloon is extremely pious charity.", michael@0: "VGhleSBzYXkgdGhhdCBkb25hdGluZyBhIGRvdWJsb29uIGlzIGV4dHJlbWVseSBwaW91cyBjaGFyaXR5Lg==" }, michael@0: { "They say that eating royal jelly attracts grizzly owlbears.", michael@0: "VGhleSBzYXkgdGhhdCBlYXRpbmcgcm95YWwgamVsbHkgYXR0cmFjdHMgZ3JpenpseSBvd2xiZWFycy4=" }, michael@0: { "They say that eggs, pancakes and juice are just a mundane breakfast.", michael@0: "VGhleSBzYXkgdGhhdCBlZ2dzLCBwYW5jYWtlcyBhbmQganVpY2UgYXJlIGp1c3QgYSBtdW5kYW5lIGJyZWFrZmFzdC4=" }, michael@0: { "They say that everyone knows why Medusa stands alone in the dark.", michael@0: "VGhleSBzYXkgdGhhdCBldmVyeW9uZSBrbm93cyB3aHkgTWVkdXNhIHN0YW5kcyBhbG9uZSBpbiB0aGUgZGFyay4=" }, michael@0: { "They say that everyone wanted rec.games.hack to undergo a name change.", michael@0: "VGhleSBzYXkgdGhhdCBldmVyeW9uZSB3YW50ZWQgcmVjLmdhbWVzLmhhY2sgdG8gdW5kZXJnbyBhIG5hbWUgY2hhbmdlLg==" }, michael@0: { "They say that finding a winning strategy is a deliberate move on your part.", michael@0: "VGhleSBzYXkgdGhhdCBmaW5kaW5nIGEgd2lubmluZyBzdHJhdGVneSBpcyBhIGRlbGliZXJhdGUgbW92ZSBvbiB5b3VyIHBhcnQu" }, michael@0: { "They say that finding worthless glass is worth something.", michael@0: "VGhleSBzYXkgdGhhdCBmaW5kaW5nIHdvcnRobGVzcyBnbGFzcyBpcyB3b3J0aCBzb21ldGhpbmcu" }, michael@0: { "They say that fortune cookies are food for thought.", michael@0: "VGhleSBzYXkgdGhhdCBmb3J0dW5lIGNvb2tpZXMgYXJlIGZvb2QgZm9yIHRob3VnaHQu" }, michael@0: { "They say that gold is only wasted on a pet dragon.", michael@0: "VGhleSBzYXkgdGhhdCBnb2xkIGlzIG9ubHkgd2FzdGVkIG9uIGEgcGV0IGRyYWdvbi4=" }, michael@0: { "They say that good things come to those that wait.", michael@0: "VGhleSBzYXkgdGhhdCBnb29kIHRoaW5ncyBjb21lIHRvIHRob3NlIHRoYXQgd2FpdC4=" }, michael@0: { "They say that greased objects will slip out of monsters' hands.", michael@0: "VGhleSBzYXkgdGhhdCBncmVhc2VkIG9iamVjdHMgd2lsbCBzbGlwIG91dCBvZiBtb25zdGVycycgaGFuZHMu" }, michael@0: { "They say that if you can't spell then you'll wish you had a spell book.", michael@0: "VGhleSBzYXkgdGhhdCBpZiB5b3UgY2FuJ3Qgc3BlbGwgdGhlbiB5b3UnbGwgd2lzaCB5b3UgaGFkIGEgc3BlbGwgYm9vay4=" }, michael@0: { "They say that if you live by the sword, you'll die by the sword.", michael@0: "VGhleSBzYXkgdGhhdCBpZiB5b3UgbGl2ZSBieSB0aGUgc3dvcmQsIHlvdSdsbCBkaWUgYnkgdGhlIHN3b3JkLg==" }, michael@0: { "They say that if you play like a monster you'll have a better game.", michael@0: "VGhleSBzYXkgdGhhdCBpZiB5b3UgcGxheSBsaWtlIGEgbW9uc3RlciB5b3UnbGwgaGF2ZSBhIGJldHRlciBnYW1lLg==" }, michael@0: { "They say that if you sleep with a demon you might awake with a headache.", michael@0: "VGhleSBzYXkgdGhhdCBpZiB5b3Ugc2xlZXAgd2l0aCBhIGRlbW9uIHlvdSBtaWdodCBhd2FrZSB3aXRoIGEgaGVhZGFjaGUu" }, michael@0: { "They say that if you step on a crack you could break your mother's back.", michael@0: "VGhleSBzYXkgdGhhdCBpZiB5b3Ugc3RlcCBvbiBhIGNyYWNrIHlvdSBjb3VsZCBicmVhayB5b3VyIG1vdGhlcidzIGJhY2su" }, michael@0: { "They say that if you're invisible you can still be heard!", michael@0: "VGhleSBzYXkgdGhhdCBpZiB5b3UncmUgaW52aXNpYmxlIHlvdSBjYW4gc3RpbGwgYmUgaGVhcmQh" }, michael@0: { "They say that if you're lucky you can feel the runes on a scroll.", michael@0: "VGhleSBzYXkgdGhhdCBpZiB5b3UncmUgbHVja3kgeW91IGNhbiBmZWVsIHRoZSBydW5lcyBvbiBhIHNjcm9sbC4=" }, michael@0: { "They say that in the big picture gold is only small change.", michael@0: "VGhleSBzYXkgdGhhdCBpbiB0aGUgYmlnIHBpY3R1cmUgZ29sZCBpcyBvbmx5IHNtYWxsIGNoYW5nZS4=" }, michael@0: { "They say that in the dungeon it's not what you know that really matters.", michael@0: "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiBpdCdzIG5vdCB3aGF0IHlvdSBrbm93IHRoYXQgcmVhbGx5IG1hdHRlcnMu" }, michael@0: { "They say that in the dungeon moon rocks are really dilithium crystals.", michael@0: "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiBtb29uIHJvY2tzIGFyZSByZWFsbHkgZGlsaXRoaXVtIGNyeXN0YWxzLg==" }, michael@0: { "They say that in the dungeon the boorish customer is never right.", michael@0: "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB0aGUgYm9vcmlzaCBjdXN0b21lciBpcyBuZXZlciByaWdodC4=" }, michael@0: { "They say that in the dungeon you don't need a watch to tell time.", michael@0: "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3UgZG9uJ3QgbmVlZCBhIHdhdGNoIHRvIHRlbGwgdGltZS4=" }, michael@0: { "They say that in the dungeon you need something old, new, burrowed and blue.", michael@0: "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3UgbmVlZCBzb21ldGhpbmcgb2xkLCBuZXcsIGJ1cnJvd2VkIGFuZCBibHVlLg==" }, michael@0: { "They say that in the dungeon you should always count your blessings.", michael@0: "VGhleSBzYXkgdGhhdCBpbiB0aGUgZHVuZ2VvbiB5b3Ugc2hvdWxkIGFsd2F5cyBjb3VudCB5b3VyIGJsZXNzaW5ncy4=" }, michael@0: { "They say that iron golem plate mail isn't worth wishing for.", michael@0: "VGhleSBzYXkgdGhhdCBpcm9uIGdvbGVtIHBsYXRlIG1haWwgaXNuJ3Qgd29ydGggd2lzaGluZyBmb3Iu" }, michael@0: { "They say that it takes four quarterstaffs to make one staff.", michael@0: "VGhleSBzYXkgdGhhdCBpdCB0YWtlcyBmb3VyIHF1YXJ0ZXJzdGFmZnMgdG8gbWFrZSBvbmUgc3RhZmYu" }, michael@0: { "They say that it's not over till the fat ladies sing.", michael@0: "VGhleSBzYXkgdGhhdCBpdCdzIG5vdCBvdmVyIHRpbGwgdGhlIGZhdCBsYWRpZXMgc2luZy4=" }, michael@0: { "They say that it's not over till the fat lady shouts `Off with its head'.", michael@0: "VGhleSBzYXkgdGhhdCBpdCdzIG5vdCBvdmVyIHRpbGwgdGhlIGZhdCBsYWR5IHNob3V0cyBgT2ZmIHdpdGggaXRzIGhlYWQnLg==" }, michael@0: { "They say that kicking a heavy statue is really a dumb move.", michael@0: "VGhleSBzYXkgdGhhdCBraWNraW5nIGEgaGVhdnkgc3RhdHVlIGlzIHJlYWxseSBhIGR1bWIgbW92ZS4=" }, michael@0: { "They say that kicking a valuable gem doesn't seem to make sense.", michael@0: "VGhleSBzYXkgdGhhdCBraWNraW5nIGEgdmFsdWFibGUgZ2VtIGRvZXNuJ3Qgc2VlbSB0byBtYWtlIHNlbnNlLg==" }, michael@0: { "They say that leprechauns know Latin and you should too.", michael@0: "VGhleSBzYXkgdGhhdCBsZXByZWNoYXVucyBrbm93IExhdGluIGFuZCB5b3Ugc2hvdWxkIHRvby4=" }, michael@0: { "They say that minotaurs get lost outside of the mazes.", michael@0: "VGhleSBzYXkgdGhhdCBtaW5vdGF1cnMgZ2V0IGxvc3Qgb3V0c2lkZSBvZiB0aGUgbWF6ZXMu" }, michael@0: { "They say that most trolls are born again.", michael@0: "VGhleSBzYXkgdGhhdCBtb3N0IHRyb2xscyBhcmUgYm9ybiBhZ2Fpbi4=" }, michael@0: { "They say that naming your cat Garfield will make you more attractive.", michael@0: "VGhleSBzYXkgdGhhdCBuYW1pbmcgeW91ciBjYXQgR2FyZmllbGQgd2lsbCBtYWtlIHlvdSBtb3JlIGF0dHJhY3RpdmUu" }, michael@0: { "They say that no one knows everything about everything in the dungeon.", michael@0: "VGhleSBzYXkgdGhhdCBubyBvbmUga25vd3MgZXZlcnl0aGluZyBhYm91dCBldmVyeXRoaW5nIGluIHRoZSBkdW5nZW9uLg==" }, michael@0: { "They say that no one plays NetHack just for the fun of it.", michael@0: "VGhleSBzYXkgdGhhdCBubyBvbmUgcGxheXMgTmV0SGFjayBqdXN0IGZvciB0aGUgZnVuIG9mIGl0Lg==" }, michael@0: { "They say that no one really subscribes to rec.games.roguelike.nethack.", michael@0: "VGhleSBzYXkgdGhhdCBubyBvbmUgcmVhbGx5IHN1YnNjcmliZXMgdG8gcmVjLmdhbWVzLnJvZ3VlbGlrZS5uZXRoYWNrLg==" }, michael@0: { "They say that no one will admit to starting a rumor.", michael@0: "VGhleSBzYXkgdGhhdCBubyBvbmUgd2lsbCBhZG1pdCB0byBzdGFydGluZyBhIHJ1bW9yLg==" }, michael@0: { "They say that nurses sometimes carry scalpels and never use them.", michael@0: "VGhleSBzYXkgdGhhdCBudXJzZXMgc29tZXRpbWVzIGNhcnJ5IHNjYWxwZWxzIGFuZCBuZXZlciB1c2UgdGhlbS4=" }, michael@0: { "They say that once you've met one wizard you've met them all.", michael@0: "VGhleSBzYXkgdGhhdCBvbmNlIHlvdSd2ZSBtZXQgb25lIHdpemFyZCB5b3UndmUgbWV0IHRoZW0gYWxsLg==" }, michael@0: { "They say that one troll is worth 10,000 newts.", michael@0: "VGhleSBzYXkgdGhhdCBvbmUgdHJvbGwgaXMgd29ydGggMTAsMDAwIG5ld3RzLg==" }, michael@0: { "They say that only David can find the zoo!", michael@0: "VGhleSBzYXkgdGhhdCBvbmx5IERhdmlkIGNhbiBmaW5kIHRoZSB6b28h" }, michael@0: { "They say that only angels play their harps for their pets.", michael@0: "VGhleSBzYXkgdGhhdCBvbmx5IGFuZ2VscyBwbGF5IHRoZWlyIGhhcnBzIGZvciB0aGVpciBwZXRzLg==" }, michael@0: { "They say that only big spenders carry gold.", michael@0: "VGhleSBzYXkgdGhhdCBvbmx5IGJpZyBzcGVuZGVycyBjYXJyeSBnb2xkLg==" }, michael@0: { "They say that orc shamans are healthy, wealthy and wise.", michael@0: "VGhleSBzYXkgdGhhdCBvcmMgc2hhbWFucyBhcmUgaGVhbHRoeSwgd2VhbHRoeSBhbmQgd2lzZS4=" }, michael@0: { "They say that playing NetHack is like walking into a death trap.", michael@0: "VGhleSBzYXkgdGhhdCBwbGF5aW5nIE5ldEhhY2sgaXMgbGlrZSB3YWxraW5nIGludG8gYSBkZWF0aCB0cmFwLg==" }, michael@0: { "They say that problem breathing is best treated by a proper diet.", michael@0: "VGhleSBzYXkgdGhhdCBwcm9ibGVtIGJyZWF0aGluZyBpcyBiZXN0IHRyZWF0ZWQgYnkgYSBwcm9wZXIgZGlldC4=" }, michael@0: { "They say that quaffing many potions of levitation can give you a headache.", michael@0: "VGhleSBzYXkgdGhhdCBxdWFmZmluZyBtYW55IHBvdGlvbnMgb2YgbGV2aXRhdGlvbiBjYW4gZ2l2ZSB5b3UgYSBoZWFkYWNoZS4=" }, michael@0: { "They say that queen bees get that way by eating royal jelly.", michael@0: "VGhleSBzYXkgdGhhdCBxdWVlbiBiZWVzIGdldCB0aGF0IHdheSBieSBlYXRpbmcgcm95YWwgamVsbHku" }, michael@0: { "They say that reading a scare monster scroll is the same as saying Elbereth.", michael@0: "VGhleSBzYXkgdGhhdCByZWFkaW5nIGEgc2NhcmUgbW9uc3RlciBzY3JvbGwgaXMgdGhlIHNhbWUgYXMgc2F5aW5nIEVsYmVyZXRoLg==" }, michael@0: { "They say that real hackers always are controlled.", michael@0: "VGhleSBzYXkgdGhhdCByZWFsIGhhY2tlcnMgYWx3YXlzIGFyZSBjb250cm9sbGVkLg==" }, michael@0: { "They say that real hackers never sleep.", michael@0: "VGhleSBzYXkgdGhhdCByZWFsIGhhY2tlcnMgbmV2ZXIgc2xlZXAu" }, michael@0: { "They say that shopkeepers are insured by Croesus himself!", michael@0: "VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBhcmUgaW5zdXJlZCBieSBDcm9lc3VzIGhpbXNlbGYh" }, michael@0: { "They say that shopkeepers never carry more than 20 gold pieces, at night.", michael@0: "VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBuZXZlciBjYXJyeSBtb3JlIHRoYW4gMjAgZ29sZCBwaWVjZXMsIGF0IG5pZ2h0Lg==" }, michael@0: { "They say that shopkeepers never sell blessed potions of invisibility.", michael@0: "VGhleSBzYXkgdGhhdCBzaG9wa2VlcGVycyBuZXZlciBzZWxsIGJsZXNzZWQgcG90aW9ucyBvZiBpbnZpc2liaWxpdHku" }, michael@0: { "They say that soldiers wear kid gloves and silly helmets.", michael@0: "VGhleSBzYXkgdGhhdCBzb2xkaWVycyB3ZWFyIGtpZCBnbG92ZXMgYW5kIHNpbGx5IGhlbG1ldHMu" }, michael@0: { "They say that some Kops are on the take.", michael@0: "VGhleSBzYXkgdGhhdCBzb21lIEtvcHMgYXJlIG9uIHRoZSB0YWtlLg==" }, michael@0: { "They say that some guards' palms can be greased.", michael@0: "VGhleSBzYXkgdGhhdCBzb21lIGd1YXJkcycgcGFsbXMgY2FuIGJlIGdyZWFzZWQu" }, michael@0: { "They say that some monsters may kiss your boots to stop your drum playing.", michael@0: "VGhleSBzYXkgdGhhdCBzb21lIG1vbnN0ZXJzIG1heSBraXNzIHlvdXIgYm9vdHMgdG8gc3RvcCB5b3VyIGRydW0gcGxheWluZy4=" }, michael@0: { "They say that sometimes you can be the hit of the party when playing a horn.", michael@0: "VGhleSBzYXkgdGhhdCBzb21ldGltZXMgeW91IGNhbiBiZSB0aGUgaGl0IG9mIHRoZSBwYXJ0eSB3aGVuIHBsYXlpbmcgYSBob3JuLg==" }, michael@0: { "They say that the NetHack gods generally welcome your sacrifices.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgTmV0SGFjayBnb2RzIGdlbmVyYWxseSB3ZWxjb21lIHlvdXIgc2FjcmlmaWNlcy4=" }, michael@0: { "They say that the Three Rings are named Vilya, Nenya and Narya.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgVGhyZWUgUmluZ3MgYXJlIG5hbWVkIFZpbHlhLCBOZW55YSBhbmQgTmFyeWEu" }, michael@0: { "They say that the Wizard of Yendor has a death wish.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgV2l6YXJkIG9mIFllbmRvciBoYXMgYSBkZWF0aCB3aXNoLg==" }, michael@0: { "They say that the `hair of the dog' is sometimes an effective remedy.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgYGhhaXIgb2YgdGhlIGRvZycgaXMgc29tZXRpbWVzIGFuIGVmZmVjdGl2ZSByZW1lZHku" }, michael@0: { "They say that the best time to save your game is now before its too late.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgYmVzdCB0aW1lIHRvIHNhdmUgeW91ciBnYW1lIGlzIG5vdyBiZWZvcmUgaXRzIHRvbyBsYXRlLg==" }, michael@0: { "They say that the biggest obstacle in NetHack is your mind.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgYmlnZ2VzdCBvYnN0YWNsZSBpbiBOZXRIYWNrIGlzIHlvdXIgbWluZC4=" }, michael@0: { "They say that the gods are angry when they hit you with objects.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgZ29kcyBhcmUgYW5ncnkgd2hlbiB0aGV5IGhpdCB5b3Ugd2l0aCBvYmplY3RzLg==" }, michael@0: { "They say that the priesthood are specially favored by the gods.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgcHJpZXN0aG9vZCBhcmUgc3BlY2lhbGx5IGZhdm9yZWQgYnkgdGhlIGdvZHMu" }, michael@0: { "They say that the way to make a unicorn happy is to give it what it wants.", michael@0: "VGhleSBzYXkgdGhhdCB0aGUgd2F5IHRvIG1ha2UgYSB1bmljb3JuIGhhcHB5IGlzIHRvIGdpdmUgaXQgd2hhdCBpdCB3YW50cy4=" }, michael@0: { "They say that there are no black or white stones, only gray.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSBhcmUgbm8gYmxhY2sgb3Igd2hpdGUgc3RvbmVzLCBvbmx5IGdyYXku" }, michael@0: { "They say that there are no skeletons hence there are no skeleton keys.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSBhcmUgbm8gc2tlbGV0b25zIGhlbmNlIHRoZXJlIGFyZSBubyBza2VsZXRvbiBrZXlzLg==" }, michael@0: { "They say that there is a clever rogue in every hacker just dying to escape.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBhIGNsZXZlciByb2d1ZSBpbiBldmVyeSBoYWNrZXIganVzdCBkeWluZyB0byBlc2NhcGUu" }, michael@0: { "They say that there is no such thing as free advice.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBubyBzdWNoIHRoaW5nIGFzIGZyZWUgYWR2aWNlLg==" }, michael@0: { "They say that there is only one way to win at NetHack.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSBpcyBvbmx5IG9uZSB3YXkgdG8gd2luIGF0IE5ldEhhY2su" }, michael@0: { "They say that there once was a fearsome chaotic samurai named Luk No.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSBvbmNlIHdhcyBhIGZlYXJzb21lIGNoYW90aWMgc2FtdXJhaSBuYW1lZCBMdWsgTm8u" }, michael@0: { "They say that there was a time when cursed holy water wasn't water.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSB3YXMgYSB0aW1lIHdoZW4gY3Vyc2VkIGhvbHkgd2F0ZXIgd2Fzbid0IHdhdGVyLg==" }, michael@0: { "They say that there's no point in crying over a gray ooze.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSdzIG5vIHBvaW50IGluIGNyeWluZyBvdmVyIGEgZ3JheSBvb3plLg==" }, michael@0: { "They say that there's only hope left after you've opened Pandora's box.", michael@0: "VGhleSBzYXkgdGhhdCB0aGVyZSdzIG9ubHkgaG9wZSBsZWZ0IGFmdGVyIHlvdSd2ZSBvcGVuZWQgUGFuZG9yYSdzIGJveC4=" }, michael@0: { "They say that trapdoors should always be marked `Caution: Trap Door'.", michael@0: "VGhleSBzYXkgdGhhdCB0cmFwZG9vcnMgc2hvdWxkIGFsd2F5cyBiZSBtYXJrZWQgYENhdXRpb246IFRyYXAgRG9vcicu" }, michael@0: { "They say that using an amulet of change isn't a difficult operation.", michael@0: "VGhleSBzYXkgdGhhdCB1c2luZyBhbiBhbXVsZXQgb2YgY2hhbmdlIGlzbid0IGEgZGlmZmljdWx0IG9wZXJhdGlvbi4=" }, michael@0: { "They say that water walking boots are better if you are fast like Hermes.", michael@0: "VGhleSBzYXkgdGhhdCB3YXRlciB3YWxraW5nIGJvb3RzIGFyZSBiZXR0ZXIgaWYgeW91IGFyZSBmYXN0IGxpa2UgSGVybWVzLg==" }, michael@0: { "They say that when you wear a circular amulet you might resemble a troll.", michael@0: "VGhleSBzYXkgdGhhdCB3aGVuIHlvdSB3ZWFyIGEgY2lyY3VsYXIgYW11bGV0IHlvdSBtaWdodCByZXNlbWJsZSBhIHRyb2xsLg==" }, michael@0: { "They say that when you're hungry you can get a pizza in 30 moves or it's free.", michael@0: "VGhleSBzYXkgdGhhdCB3aGVuIHlvdSdyZSBodW5ncnkgeW91IGNhbiBnZXQgYSBwaXp6YSBpbiAzMCBtb3ZlcyBvciBpdCdzIGZyZWUu" }, michael@0: { "They say that when your god is angry you should try another one.", michael@0: "VGhleSBzYXkgdGhhdCB3aGVuIHlvdXIgZ29kIGlzIGFuZ3J5IHlvdSBzaG91bGQgdHJ5IGFub3RoZXIgb25lLg==" }, michael@0: { "They say that wielding a unicorn horn takes strength.", michael@0: "VGhleSBzYXkgdGhhdCB3aWVsZGluZyBhIHVuaWNvcm4gaG9ybiB0YWtlcyBzdHJlbmd0aC4=" }, michael@0: { "They say that with speed boots you never worry about hit and run accidents.", michael@0: "VGhleSBzYXkgdGhhdCB3aXRoIHNwZWVkIGJvb3RzIHlvdSBuZXZlciB3b3JyeSBhYm91dCBoaXQgYW5kIHJ1biBhY2NpZGVudHMu" }, michael@0: { "They say that you can defeat a killer bee with a unicorn horn.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuIGRlZmVhdCBhIGtpbGxlciBiZWUgd2l0aCBhIHVuaWNvcm4gaG9ybi4=" }, michael@0: { "They say that you can only cross the River Styx in Charon's boat.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkgY3Jvc3MgdGhlIFJpdmVyIFN0eXggaW4gQ2hhcm9uJ3MgYm9hdC4=" }, michael@0: { "They say that you can only kill a lich once and then you'd better be careful.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkga2lsbCBhIGxpY2ggb25jZSBhbmQgdGhlbiB5b3UnZCBiZXR0ZXIgYmUgY2FyZWZ1bC4=" }, michael@0: { "They say that you can only wish for things you've already had.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuIG9ubHkgd2lzaCBmb3IgdGhpbmdzIHlvdSd2ZSBhbHJlYWR5IGhhZC4=" }, michael@0: { "They say that you can train a cat by talking gently to it.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRyYWluIGEgY2F0IGJ5IHRhbGtpbmcgZ2VudGx5IHRvIGl0Lg==" }, michael@0: { "They say that you can train a dog by talking firmly to it.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRyYWluIGEgZG9nIGJ5IHRhbGtpbmcgZmlybWx5IHRvIGl0Lg==" }, michael@0: { "They say that you can trust your gold with the king.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuIHRydXN0IHlvdXIgZ29sZCB3aXRoIHRoZSBraW5nLg==" }, michael@0: { "They say that you can't wipe your greasy bare hands on a blank scroll.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2FuJ3Qgd2lwZSB5b3VyIGdyZWFzeSBiYXJlIGhhbmRzIG9uIGEgYmxhbmsgc2Nyb2xsLg==" }, michael@0: { "They say that you cannot trust scrolls of rumor.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY2Fubm90IHRydXN0IHNjcm9sbHMgb2YgcnVtb3Iu" }, michael@0: { "They say that you could fall head over heels for an energy vortex.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgY291bGQgZmFsbCBoZWFkIG92ZXIgaGVlbHMgZm9yIGFuIGVuZXJneSB2b3J0ZXgu" }, michael@0: { "They say that you need a key in order to open locked doors.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgbmVlZCBhIGtleSBpbiBvcmRlciB0byBvcGVuIGxvY2tlZCBkb29ycy4=" }, michael@0: { "They say that you need a mirror to notice a mimic in an antique shop.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgbmVlZCBhIG1pcnJvciB0byBub3RpY2UgYSBtaW1pYyBpbiBhbiBhbnRpcXVlIHNob3Au" }, michael@0: { "They say that you really can use a pick-axe unless you really can't.", michael@0: "VGhleSBzYXkgdGhhdCB5b3UgcmVhbGx5IGNhbiB1c2UgYSBwaWNrLWF4ZSB1bmxlc3MgeW91IHJlYWxseSBjYW4ndC4=" }, michael@0: { "They say that you should always store your tools in the cellar.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGFsd2F5cyBzdG9yZSB5b3VyIHRvb2xzIGluIHRoZSBjZWxsYXIu" }, michael@0: { "They say that you should be careful while climbing the ladder to success.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGJlIGNhcmVmdWwgd2hpbGUgY2xpbWJpbmcgdGhlIGxhZGRlciB0byBzdWNjZXNzLg==" }, michael@0: { "They say that you should call your armor `rustproof'.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIGNhbGwgeW91ciBhcm1vciBgcnVzdHByb29mJy4=" }, michael@0: { "They say that you should name your dog Spuds to have a cool pet.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5hbWUgeW91ciBkb2cgU3B1ZHMgdG8gaGF2ZSBhIGNvb2wgcGV0Lg==" }, michael@0: { "They say that you should name your weapon after your first monster kill.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5hbWUgeW91ciB3ZWFwb24gYWZ0ZXIgeW91ciBmaXJzdCBtb25zdGVyIGtpbGwu" }, michael@0: { "They say that you should never introduce a rope golem to a succubus.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIGludHJvZHVjZSBhIHJvcGUgZ29sZW0gdG8gYSBzdWNjdWJ1cy4=" }, michael@0: { "They say that you should never sleep near invisible ring wraiths.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIHNsZWVwIG5lYXIgaW52aXNpYmxlIHJpbmcgd3JhaXRocy4=" }, michael@0: { "They say that you should never try to leave the dungeon with a bag of gems.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIG5ldmVyIHRyeSB0byBsZWF2ZSB0aGUgZHVuZ2VvbiB3aXRoIGEgYmFnIG9mIGdlbXMu" }, michael@0: { "They say that you should remove your armor before sitting on a throne.", michael@0: "VGhleSBzYXkgdGhhdCB5b3Ugc2hvdWxkIHJlbW92ZSB5b3VyIGFybW9yIGJlZm9yZSBzaXR0aW5nIG9uIGEgdGhyb25lLg==" }, michael@0: { "This fortune cookie is copy protected.", michael@0: "VGhpcyBmb3J0dW5lIGNvb2tpZSBpcyBjb3B5IHByb3RlY3RlZC4=" }, michael@0: { "This fortune cookie is the property of Fortune Cookies, Inc.", michael@0: "VGhpcyBmb3J0dW5lIGNvb2tpZSBpcyB0aGUgcHJvcGVydHkgb2YgRm9ydHVuZSBDb29raWVzLCBJbmMu" }, michael@0: { "Tired? Try a scroll of charging on yourself.", michael@0: "VGlyZWQ/IFRyeSBhIHNjcm9sbCBvZiBjaGFyZ2luZyBvbiB5b3Vyc2VsZi4=" }, michael@0: { "To achieve the next higher rating, you need 3 more points.", michael@0: "VG8gYWNoaWV2ZSB0aGUgbmV4dCBoaWdoZXIgcmF0aW5nLCB5b3UgbmVlZCAzIG1vcmUgcG9pbnRzLg==" }, michael@0: { "To reach heaven, escape the dungeon while wearing a ring of levitation.", michael@0: "VG8gcmVhY2ggaGVhdmVuLCBlc2NhcGUgdGhlIGR1bmdlb24gd2hpbGUgd2VhcmluZyBhIHJpbmcgb2YgbGV2aXRhdGlvbi4=" }, michael@0: { "Tourists wear shirts loud enough to wake the dead.", michael@0: "VG91cmlzdHMgd2VhciBzaGlydHMgbG91ZCBlbm91Z2ggdG8gd2FrZSB0aGUgZGVhZC4=" }, michael@0: { "Try calling your katana Moulinette.", michael@0: "VHJ5IGNhbGxpbmcgeW91ciBrYXRhbmEgTW91bGluZXR0ZS4=" }, michael@0: { "Ulch! That meat was painted!", michael@0: "VWxjaCEgVGhhdCBtZWF0IHdhcyBwYWludGVkIQ==" }, michael@0: { "Unfortunately, this message was left intentionally blank.", michael@0: "VW5mb3J0dW5hdGVseSwgdGhpcyBtZXNzYWdlIHdhcyBsZWZ0IGludGVudGlvbmFsbHkgYmxhbmsu" }, michael@0: { "Using a morning star in the evening has no effect.", michael@0: "VXNpbmcgYSBtb3JuaW5nIHN0YXIgaW4gdGhlIGV2ZW5pbmcgaGFzIG5vIGVmZmVjdC4=" }, michael@0: { "Want a hint? Zap a wand of make invisible on your weapon!", michael@0: "V2FudCBhIGhpbnQ/IFphcCBhIHdhbmQgb2YgbWFrZSBpbnZpc2libGUgb24geW91ciB3ZWFwb24h" }, michael@0: { "Want to ascend in a hurry? Apply at Gizmonic Institute.", michael@0: "V2FudCB0byBhc2NlbmQgaW4gYSBodXJyeT8gQXBwbHkgYXQgR2l6bW9uaWMgSW5zdGl0dXRlLg==" }, michael@0: { "Wanted: shopkeepers. Send a scroll of mail to Mage of Yendor/Level 35/Dungeon.", michael@0: "V2FudGVkOiBzaG9wa2VlcGVycy4gU2VuZCBhIHNjcm9sbCBvZiBtYWlsIHRvIE1hZ2Ugb2YgWWVuZG9yL0xldmVsIDM1L0R1bmdlb24u" }, michael@0: { "Warning: fortune reading can be hazardous to your health.", michael@0: "V2FybmluZzogZm9ydHVuZSByZWFkaW5nIGNhbiBiZSBoYXphcmRvdXMgdG8geW91ciBoZWFsdGgu" }, michael@0: { "We have new ways of detecting treachery...", michael@0: "V2UgaGF2ZSBuZXcgd2F5cyBvZiBkZXRlY3RpbmcgdHJlYWNoZXJ5Li4u" }, michael@0: { "Wet towels make great weapons!", michael@0: "V2V0IHRvd2VscyBtYWtlIGdyZWF0IHdlYXBvbnMh" }, michael@0: { "What a pity, you cannot read it!", michael@0: "V2hhdCBhIHBpdHksIHlvdSBjYW5ub3QgcmVhZCBpdCE=" }, michael@0: { "When a piercer drops in on you, you will be tempted to hit the ceiling!", michael@0: "V2hlbiBhIHBpZXJjZXIgZHJvcHMgaW4gb24geW91LCB5b3Ugd2lsbCBiZSB0ZW1wdGVkIHRvIGhpdCB0aGUgY2VpbGluZyE=" }, michael@0: { "When in a maze follow the right wall and you will never get lost.", michael@0: "V2hlbiBpbiBhIG1hemUgZm9sbG93IHRoZSByaWdodCB3YWxsIGFuZCB5b3Ugd2lsbCBuZXZlciBnZXQgbG9zdC4=" }, michael@0: { "When you have a key, you don't have to wait for the guard.", michael@0: "V2hlbiB5b3UgaGF2ZSBhIGtleSwgeW91IGRvbid0IGhhdmUgdG8gd2FpdCBmb3IgdGhlIGd1YXJkLg==" }, michael@0: { "Why are you wasting time reading fortunes?", michael@0: "V2h5IGFyZSB5b3Ugd2FzdGluZyB0aW1lIHJlYWRpbmcgZm9ydHVuZXM/" }, michael@0: { "Wish for a master key and open the Magic Memory Vault!", michael@0: "V2lzaCBmb3IgYSBtYXN0ZXIga2V5IGFuZCBvcGVuIHRoZSBNYWdpYyBNZW1vcnkgVmF1bHQh" }, michael@0: { "Wizard expects every monster to do its duty.", michael@0: "V2l6YXJkIGV4cGVjdHMgZXZlcnkgbW9uc3RlciB0byBkbyBpdHMgZHV0eS4=" }, michael@0: { "Wow! You could've had a potion of fruit juice!", michael@0: "V293ISBZb3UgY291bGQndmUgaGFkIGEgcG90aW9uIG9mIGZydWl0IGp1aWNlIQ==" }, michael@0: { "Yet Another Silly Message (YASM).", michael@0: "WWV0IEFub3RoZXIgU2lsbHkgTWVzc2FnZSAoWUFTTSku" }, michael@0: { "You are destined to be misled by a fortune.", michael@0: "WW91IGFyZSBkZXN0aW5lZCB0byBiZSBtaXNsZWQgYnkgYSBmb3J0dW5lLg==" }, michael@0: { "You can get a genuine Amulet of Yendor by doing the following: --More--", michael@0: "WW91IGNhbiBnZXQgYSBnZW51aW5lIEFtdWxldCBvZiBZZW5kb3IgYnkgZG9pbmcgdGhlIGZvbGxvd2luZzogLS1Nb3JlLS0=" }, michael@0: { "You can protect yourself from black dragons by doing the following: --More--", michael@0: "WW91IGNhbiBwcm90ZWN0IHlvdXJzZWxmIGZyb20gYmxhY2sgZHJhZ29ucyBieSBkb2luZyB0aGUgZm9sbG93aW5nOiAtLU1vcmUtLQ==" }, michael@0: { "You can't get by the snake.", michael@0: "WW91IGNhbid0IGdldCBieSB0aGUgc25ha2Uu" }, michael@0: { "You feel like someone is pulling your leg.", michael@0: "WW91IGZlZWwgbGlrZSBzb21lb25lIGlzIHB1bGxpbmcgeW91ciBsZWcu" }, michael@0: { "You have to outwit the Sphynx or pay her.", michael@0: "WW91IGhhdmUgdG8gb3V0d2l0IHRoZSBTcGh5bnggb3IgcGF5IGhlci4=" }, michael@0: { "You hear the fortune cookie's hissing!", michael@0: "WW91IGhlYXIgdGhlIGZvcnR1bmUgY29va2llJ3MgaGlzc2luZyE=" }, michael@0: { "You may get rich selling letters, but beware of being blackmailed!", michael@0: "WW91IG1heSBnZXQgcmljaCBzZWxsaW5nIGxldHRlcnMsIGJ1dCBiZXdhcmUgb2YgYmVpbmcgYmxhY2ttYWlsZWQh" }, michael@0: { "You offend Shai-Hulud by sheathing your crysknife without having drawn blood.", michael@0: "WW91IG9mZmVuZCBTaGFpLUh1bHVkIGJ5IHNoZWF0aGluZyB5b3VyIGNyeXNrbmlmZSB3aXRob3V0IGhhdmluZyBkcmF3biBibG9vZC4=" }, michael@0: { "You swallowed the fortune!", michael@0: "WW91IHN3YWxsb3dlZCB0aGUgZm9ydHVuZSE=" }, michael@0: { "You want to regain strength? Two levels ahead is a guesthouse!", michael@0: "WW91IHdhbnQgdG8gcmVnYWluIHN0cmVuZ3RoPyBUd28gbGV2ZWxzIGFoZWFkIGlzIGEgZ3Vlc3Rob3VzZSE=" }, michael@0: { "You will encounter a tall, dark, and gruesome creature...", michael@0: "WW91IHdpbGwgZW5jb3VudGVyIGEgdGFsbCwgZGFyaywgYW5kIGdydWVzb21lIGNyZWF0dXJlLi4u" }, michael@0: michael@0: { "The End", "VGhlIEVuZA==" } michael@0: }; michael@0: michael@0: /* PL_Base64Encode, random strings */ michael@0: PRBool test_004(void) michael@0: { michael@0: int i; michael@0: char result[ 4096 ]; michael@0: michael@0: printf("Test 004 (PL_Base64Encode, random strings) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 plen = PL_strlen(array[i].plaintext); michael@0: PRUint32 clen = ((plen + 2)/3)*4; michael@0: michael@0: char *rv = PL_Base64Encode(array[i].plaintext, plen, result); michael@0: michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d): return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp(result, array[i].cyphertext, clen) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", michael@0: i, array[i].plaintext, array[i].cyphertext, clen, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, single characters, malloc */ michael@0: PRBool test_005(void) michael@0: { michael@0: PRUint32 a, b; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 005 (PL_Base64Encode, single characters, malloc) ..."); fflush(stdout); michael@0: michael@0: plain[1] = plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[2] = cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (unsigned char)(a * 4 + b); michael@0: cypher[1] = base[(b * 16)]; michael@0: michael@0: rv = PL_Base64Encode((char *)plain, 1, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): no return value\n", a, b); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)cypher, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%s.\"\n", michael@0: a, b, cypher, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, double characters, malloc */ michael@0: PRBool test_006(void) michael@0: { michael@0: PRUint32 a, b, c, d; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 006 (PL_Base64Encode, double characters, malloc) ..."); fflush(stdout); michael@0: michael@0: plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: cypher[2] = base[d*4]; michael@0: michael@0: rv = PL_Base64Encode((char *)plain, 2, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): no return value\n", a, b, c, d); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)cypher, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%s.\"\n", michael@0: a, b, c, d, cypher, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, triple characters, malloc */ michael@0: PRBool test_007(void) michael@0: { michael@0: PRUint32 a, b, c, d, e, f; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 007 (PL_Base64Encode, triple characters, malloc) ..."); fflush(stdout); michael@0: michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: for( e = 0; e < 4; e++ ) michael@0: { michael@0: cypher[2] = base[d*4 + e]; michael@0: for( f = 0; f < 64; f++ ) michael@0: { michael@0: plain[2] = e * 64 + f; michael@0: cypher[3] = base[f]; michael@0: michael@0: rv = PL_Base64Encode((char *)plain, 3, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): no return value\n", a, b, c, d, e, f); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)cypher, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.4s.\"\n", michael@0: a, b, c, d, e, f, cypher, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, random strings, malloc */ michael@0: PRBool test_008(void) michael@0: { michael@0: int i; michael@0: michael@0: printf("Test 008 (PL_Base64Encode, random strings, malloc) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 plen = PL_strlen(array[i].plaintext); michael@0: PRUint32 clen = ((plen + 2)/3)*4; michael@0: michael@0: char *rv = PL_Base64Encode(array[i].plaintext, plen, (char *)0); michael@0: michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d): no return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp(rv, array[i].cyphertext) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", michael@0: i, array[i].plaintext, array[i].cyphertext, rv); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, single characters */ michael@0: PRBool test_009(void) michael@0: { michael@0: PRUint32 a, b; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 009 (PL_Base64Decode, single characters, equals) ..."); fflush(stdout); michael@0: michael@0: plain[1] = plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[2] = cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (unsigned char)(a * 4 + b); michael@0: cypher[1] = base[(b * 16)]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 4, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): return value\n", a, b); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)plain, result, 1) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%.1s.\"\n", michael@0: a, b, plain, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, single characters */ michael@0: PRBool test_010(void) michael@0: { michael@0: PRUint32 a, b; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 010 (PL_Base64Decode, single characters, no equals) ..."); fflush(stdout); michael@0: michael@0: plain[1] = plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[2] = cypher[3] = (unsigned char)0; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (unsigned char)(a * 4 + b); michael@0: cypher[1] = base[(b * 16)]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 2, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): return value\n", a, b); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)plain, result, 1) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%.1s.\"\n", michael@0: a, b, plain, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, double characters */ michael@0: PRBool test_011(void) michael@0: { michael@0: PRUint32 a, b, c, d; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 011 (PL_Base64Decode, double characters, equals) ..."); fflush(stdout); michael@0: michael@0: plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: cypher[2] = base[d*4]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 4, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): return value\n", a, b, c, d); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)plain, result, 2) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%.2s.\"\n", michael@0: a, b, c, d, plain, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, double characters */ michael@0: PRBool test_012(void) michael@0: { michael@0: PRUint32 a, b, c, d; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 012 (PL_Base64Decode, double characters, no equals) ..."); fflush(stdout); michael@0: michael@0: plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[3] = (unsigned char)0; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: cypher[2] = base[d*4]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 3, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): return value\n", a, b, c, d); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)plain, result, 2) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%.2s.\"\n", michael@0: a, b, c, d, cypher, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, triple characters */ michael@0: PRBool test_013(void) michael@0: { michael@0: PRUint32 a, b, c, d, e, f; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char result[ 8 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 013 (PL_Base64Decode, triple characters) ..."); fflush(stdout); michael@0: michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: for( e = 0; e < 4; e++ ) michael@0: { michael@0: cypher[2] = base[d*4 + e]; michael@0: for( f = 0; f < 64; f++ ) michael@0: { michael@0: plain[2] = e * 64 + f; michael@0: cypher[3] = base[f]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 4, result); michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): return value\n", a, b, c, d, e, f); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp((char *)plain, result, 3) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.3s.\"\n", michael@0: a, b, c, d, e, f, plain, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, random strings */ michael@0: PRBool test_014(void) michael@0: { michael@0: int i; michael@0: char result[ 4096 ]; michael@0: michael@0: printf("Test 014 (PL_Base64Decode, random strings, equals) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen = PL_strlen(array[i].cyphertext); michael@0: PRUint32 plen = (clen * 3) / 4; michael@0: michael@0: char *rv = PL_Base64Decode(array[i].cyphertext, clen, result); michael@0: michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d): return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 == (clen & 3) ) michael@0: { michael@0: if( '=' == array[i].cyphertext[clen-1] ) michael@0: { michael@0: if( '=' == array[i].cyphertext[clen-2] ) michael@0: { michael@0: plen -= 2; michael@0: } michael@0: else michael@0: { michael@0: plen -= 1; michael@0: } michael@0: } michael@0: } michael@0: michael@0: if( 0 != PL_strncmp(result, array[i].plaintext, plen) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, plen, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, random strings */ michael@0: PRBool test_015(void) michael@0: { michael@0: int i; michael@0: char buffer[ 4096 ]; michael@0: char result[ 4096 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 015 (PL_Base64Decode, random strings, no equals) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen, plen; michael@0: michael@0: PL_strcpy(buffer, array[i].cyphertext); michael@0: clen = PL_strlen(buffer); michael@0: michael@0: if( 0 == (clen & 3) ) michael@0: { michael@0: if( '=' == buffer[clen-1] ) michael@0: { michael@0: if( '=' == buffer[clen-2] ) michael@0: { michael@0: buffer[clen-2] = buffer[clen-1] = (char)0; michael@0: clen -= 2; michael@0: } michael@0: else michael@0: { michael@0: buffer[clen-1] = (char)0; michael@0: clen -= 1; michael@0: } michael@0: } michael@0: } michael@0: michael@0: plen = (clen * 3) / 4; michael@0: michael@0: rv = PL_Base64Decode(buffer, clen, result); michael@0: michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d): return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp(result, array[i].plaintext, plen) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, plen, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, single characters, malloc */ michael@0: PRBool test_016(void) michael@0: { michael@0: PRUint32 a, b; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 016 (PL_Base64Decode, single characters, equals, malloc) ..."); fflush(stdout); michael@0: michael@0: plain[1] = plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[2] = cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (unsigned char)(a * 4 + b); michael@0: cypher[1] = base[(b * 16)]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 4, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): no return value\n", a, b); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)plain, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%s.\"\n", michael@0: a, b, plain, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, single characters, malloc */ michael@0: PRBool test_017(void) michael@0: { michael@0: PRUint32 a, b; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 017 (PL_Base64Decode, single characters, no equals, malloc) ..."); fflush(stdout); michael@0: michael@0: plain[1] = plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[2] = cypher[3] = (unsigned char)0; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (unsigned char)(a * 4 + b); michael@0: cypher[1] = base[(b * 16)]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 2, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): no return value\n", a, b); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)plain, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d): expected \"%s,\" got \"%s.\"\n", michael@0: a, b, plain, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, double characters, malloc */ michael@0: PRBool test_018(void) michael@0: { michael@0: PRUint32 a, b, c, d; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 018 (PL_Base64Decode, double characters, equals, malloc) ..."); fflush(stdout); michael@0: michael@0: plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[3] = (unsigned char)'='; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: cypher[2] = base[d*4]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 4, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): no return value\n", a, b, c, d); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)plain, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%s.\"\n", michael@0: a, b, c, d, plain, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, double characters, malloc */ michael@0: PRBool test_019(void) michael@0: { michael@0: PRUint32 a, b, c, d; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 019 (PL_Base64Decode, double characters, no equals, malloc) ..."); fflush(stdout); michael@0: michael@0: plain[2] = plain[3] = (unsigned char)0; michael@0: cypher[3] = (unsigned char)0; michael@0: cypher[4] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: cypher[2] = base[d*4]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 3, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): no return value\n", a, b, c, d); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)plain, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d): expected \"%s,\" got \"%s.\"\n", michael@0: a, b, c, d, cypher, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, triple characters, malloc */ michael@0: PRBool test_020(void) michael@0: { michael@0: PRUint32 a, b, c, d, e, f; michael@0: unsigned char plain[ 4 ]; michael@0: unsigned char cypher[ 5 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 020 (PL_Base64Decode, triple characters, malloc) ..."); fflush(stdout); michael@0: michael@0: cypher[4] = (unsigned char)0; michael@0: plain[3] = (unsigned char)0; michael@0: michael@0: for( a = 0; a < 64; a++ ) michael@0: { michael@0: cypher[0] = base[a]; michael@0: for( b = 0; b < 4; b++ ) michael@0: { michael@0: plain[0] = (a*4) + b; michael@0: for( c = 0; c < 16; c++ ) michael@0: { michael@0: cypher[1] = base[b*16 + c]; michael@0: for( d = 0; d < 16; d++ ) michael@0: { michael@0: plain[1] = c*16 + d; michael@0: for( e = 0; e < 4; e++ ) michael@0: { michael@0: cypher[2] = base[d*4 + e]; michael@0: for( f = 0; f < 64; f++ ) michael@0: { michael@0: plain[2] = e * 64 + f; michael@0: cypher[3] = base[f]; michael@0: michael@0: rv = PL_Base64Decode((char *)cypher, 4, (char *)0); michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): no return value\n", a, b, c, d, e, f); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp((char *)plain, rv) ) michael@0: { michael@0: printf("FAIL\n\t(%d, %d, %d, %d, %d, %d): expected \"%s,\" got \"%.3s.\"\n", michael@0: a, b, c, d, e, f, plain, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, random strings, malloc */ michael@0: PRBool test_021(void) michael@0: { michael@0: int i; michael@0: michael@0: printf("Test 021 (PL_Base64Decode, random strings, equals, malloc) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen = PL_strlen(array[i].cyphertext); michael@0: michael@0: char *rv = PL_Base64Decode(array[i].cyphertext, clen, (char *)0); michael@0: michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d): no return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp(rv, array[i].plaintext) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, random strings, malloc */ michael@0: PRBool test_022(void) michael@0: { michael@0: int i; michael@0: char buffer[ 4096 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 022 (PL_Base64Decode, random strings, no equals, malloc) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen; michael@0: michael@0: PL_strcpy(buffer, array[i].cyphertext); michael@0: clen = PL_strlen(buffer); michael@0: michael@0: if( 0 == (clen & 3) ) michael@0: { michael@0: if( '=' == buffer[clen-1] ) michael@0: { michael@0: if( '=' == buffer[clen-2] ) michael@0: { michael@0: buffer[clen-2] = buffer[clen-1] = (char)0; michael@0: clen -= 2; michael@0: } michael@0: else michael@0: { michael@0: buffer[clen-1] = (char)0; michael@0: clen -= 1; michael@0: } michael@0: } michael@0: } michael@0: michael@0: rv = PL_Base64Decode(buffer, clen, (char *)0); michael@0: michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d): no return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp(rv, array[i].plaintext) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, rv); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, random strings */ michael@0: PRBool test_023(void) michael@0: { michael@0: int i; michael@0: char result[ 4096 ]; michael@0: michael@0: printf("Test 023 (PL_Base64Encode, random strings, strlen) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 plen = PL_strlen(array[i].plaintext); michael@0: PRUint32 clen = ((plen + 2)/3)*4; michael@0: michael@0: char *rv = PL_Base64Encode(array[i].plaintext, 0, result); michael@0: michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d): return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp(result, array[i].cyphertext, clen) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", michael@0: i, array[i].plaintext, array[i].cyphertext, clen, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, random strings, malloc */ michael@0: PRBool test_024(void) michael@0: { michael@0: int i; michael@0: michael@0: printf("Test 024 (PL_Base64Encode, random strings, malloc, strlen) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 plen = PL_strlen(array[i].plaintext); michael@0: PRUint32 clen = ((plen + 2)/3)*4; michael@0: michael@0: char *rv = PL_Base64Encode(array[i].plaintext, 0, (char *)0); michael@0: michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d): no return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp(rv, array[i].cyphertext) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", michael@0: i, array[i].plaintext, array[i].cyphertext, rv); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, random strings */ michael@0: PRBool test_025(void) michael@0: { michael@0: int i; michael@0: char result[ 4096 ]; michael@0: michael@0: printf("Test 025 (PL_Base64Decode, random strings, equals, strlen) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen = PL_strlen(array[i].cyphertext); michael@0: PRUint32 plen = (clen * 3) / 4; michael@0: michael@0: char *rv = PL_Base64Decode(array[i].cyphertext, 0, result); michael@0: michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d): return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 == (clen & 3) ) michael@0: { michael@0: if( '=' == array[i].cyphertext[clen-1] ) michael@0: { michael@0: if( '=' == array[i].cyphertext[clen-2] ) michael@0: { michael@0: plen -= 2; michael@0: } michael@0: else michael@0: { michael@0: plen -= 1; michael@0: } michael@0: } michael@0: } michael@0: michael@0: if( 0 != PL_strncmp(result, array[i].plaintext, plen) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, plen, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, random strings */ michael@0: PRBool test_026(void) michael@0: { michael@0: int i; michael@0: char buffer[ 4096 ]; michael@0: char result[ 4096 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 026 (PL_Base64Decode, random strings, no equals, strlen) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen, plen; michael@0: michael@0: PL_strcpy(buffer, array[i].cyphertext); michael@0: clen = PL_strlen(buffer); michael@0: michael@0: if( 0 == (clen & 3) ) michael@0: { michael@0: if( '=' == buffer[clen-1] ) michael@0: { michael@0: if( '=' == buffer[clen-2] ) michael@0: { michael@0: buffer[clen-2] = buffer[clen-1] = (char)0; michael@0: clen -= 2; michael@0: } michael@0: else michael@0: { michael@0: buffer[clen-1] = (char)0; michael@0: clen -= 1; michael@0: } michael@0: } michael@0: } michael@0: michael@0: plen = (clen * 3) / 4; michael@0: michael@0: rv = PL_Base64Decode(buffer, 0, result); michael@0: michael@0: if( rv != result ) michael@0: { michael@0: printf("FAIL\n\t(%d): return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strncmp(result, array[i].plaintext, plen) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%.*s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, plen, result); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Decode, random strings, malloc */ michael@0: PRBool test_027(void) michael@0: { michael@0: int i; michael@0: michael@0: printf("Test 027 (PL_Base64Decode, random strings, equals, malloc, strlen) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen = PL_strlen(array[i].cyphertext); michael@0: michael@0: char *rv = PL_Base64Decode(array[i].cyphertext, 0, (char *)0); michael@0: michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d): no return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp(rv, array[i].plaintext) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, rv); michael@0: PR_DELETE(rv); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: PR_DELETE(rv); michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: /* PL_Base64Encode, random strings, malloc */ michael@0: PRBool test_028(void) michael@0: { michael@0: int i; michael@0: char buffer[ 4096 ]; michael@0: char *rv; michael@0: michael@0: printf("Test 028 (PL_Base64Decode, random strings, no equals, malloc, strlen) ..."); fflush(stdout); michael@0: michael@0: for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) michael@0: { michael@0: PRUint32 clen; michael@0: michael@0: PL_strcpy(buffer, array[i].cyphertext); michael@0: clen = PL_strlen(buffer); michael@0: michael@0: if( 0 == (clen & 3) ) michael@0: { michael@0: if( '=' == buffer[clen-1] ) michael@0: { michael@0: if( '=' == buffer[clen-2] ) michael@0: { michael@0: buffer[clen-2] = buffer[clen-1] = (char)0; michael@0: clen -= 2; michael@0: } michael@0: else michael@0: { michael@0: buffer[clen-1] = (char)0; michael@0: clen -= 1; michael@0: } michael@0: } michael@0: } michael@0: michael@0: rv = PL_Base64Decode(buffer, 0, (char *)0); michael@0: michael@0: if( (char *)0 == rv ) michael@0: { michael@0: printf("FAIL\n\t(%d): no return value\n", i); michael@0: return PR_FALSE; michael@0: } michael@0: michael@0: if( 0 != PL_strcmp(rv, array[i].plaintext) ) michael@0: { michael@0: printf("FAIL\n\t(%d, \"%s\"): expected \n\"%s,\" got \n\"%s.\"\n", michael@0: i, array[i].cyphertext, array[i].plaintext, rv); michael@0: return PR_FALSE; michael@0: } michael@0: } michael@0: michael@0: printf("PASS\n"); michael@0: return PR_TRUE; michael@0: } michael@0: michael@0: int michael@0: main michael@0: ( michael@0: int argc, michael@0: char *argv[] michael@0: ) michael@0: { michael@0: printf("Testing the Portable Library base64 functions:\n"); michael@0: printf("(warning: the \"triple characters\" tests are slow)\n"); michael@0: michael@0: if( 1 michael@0: && test_001() michael@0: && test_002() michael@0: && test_003() michael@0: && test_004() michael@0: && test_005() michael@0: && test_006() michael@0: && test_007() michael@0: && test_008() michael@0: && test_009() michael@0: && test_010() michael@0: && test_011() michael@0: && test_012() michael@0: && test_013() michael@0: && test_014() michael@0: && test_015() michael@0: && test_016() michael@0: && test_017() michael@0: && test_018() michael@0: && test_019() michael@0: && test_020() michael@0: && test_021() michael@0: && test_022() michael@0: && test_023() michael@0: && test_024() michael@0: && test_025() michael@0: && test_026() michael@0: && test_027() michael@0: && test_028() michael@0: ) michael@0: { michael@0: printf("Suite passed.\n"); michael@0: return 0; michael@0: } michael@0: else michael@0: { michael@0: printf("Suite failed.\n"); michael@0: return 1; michael@0: } michael@0: michael@0: /*NOTREACHED*/ michael@0: }