annotate forum/Themes/default/sha1.js @ 82:6dd719d7c78b website

Add Sonic Annotator pages (probably best to host it here in future rather than with the omras2 site)
author Chris Cannam
date Mon, 20 Jan 2014 10:48:02 +0000
parents e3e11437ecea
children
rev   line source
Chris@76 1 /*
Chris@76 2 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
Chris@76 3 * in FIPS PUB 180-1
Chris@76 4 * Version 2.1 Copyright Paul Johnston 2000 - 2002.
Chris@76 5 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
Chris@76 6 * Distributed under the BSD License
Chris@76 7 * See http://pajhome.org.uk/crypt/md5 for details.
Chris@76 8 */
Chris@76 9
Chris@76 10 /*
Chris@76 11 * Configurable variables. You may need to tweak these to be compatible with
Chris@76 12 * the server-side, but the defaults work in most cases.
Chris@76 13 */
Chris@76 14 var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
Chris@76 15 var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
Chris@76 16 var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
Chris@76 17
Chris@76 18 /*
Chris@76 19 * These are the functions you'll usually want to call
Chris@76 20 * They take string arguments and return either hex or base-64 encoded strings
Chris@76 21 */
Chris@76 22 function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));}
Chris@76 23 function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));}
Chris@76 24 function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));}
Chris@76 25 function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));}
Chris@76 26 function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));}
Chris@76 27 function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));}
Chris@76 28
Chris@76 29 /*
Chris@76 30 * Perform a simple self-test to see if the VM is working
Chris@76 31 */
Chris@76 32 function sha1_vm_test()
Chris@76 33 {
Chris@76 34 return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
Chris@76 35 }
Chris@76 36
Chris@76 37 /*
Chris@76 38 * Calculate the SHA-1 of an array of big-endian words, and a bit length
Chris@76 39 */
Chris@76 40 function core_sha1(x, len)
Chris@76 41 {
Chris@76 42 /* append padding */
Chris@76 43 x[len >> 5] |= 0x80 << (24 - len % 32);
Chris@76 44 x[((len + 64 >> 9) << 4) + 15] = len;
Chris@76 45
Chris@76 46 var w = Array(80);
Chris@76 47 var a = 1732584193;
Chris@76 48 var b = -271733879;
Chris@76 49 var c = -1732584194;
Chris@76 50 var d = 271733878;
Chris@76 51 var e = -1009589776;
Chris@76 52
Chris@76 53 for (var i = 0; i < x.length; i += 16)
Chris@76 54 {
Chris@76 55 var olda = a;
Chris@76 56 var oldb = b;
Chris@76 57 var oldc = c;
Chris@76 58 var oldd = d;
Chris@76 59 var olde = e;
Chris@76 60
Chris@76 61 for (var j = 0; j < 80; j++)
Chris@76 62 {
Chris@76 63 if (j < 16) w[j] = x[i + j];
Chris@76 64 else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
Chris@76 65 var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
Chris@76 66 e = d;
Chris@76 67 d = c;
Chris@76 68 c = rol(b, 30);
Chris@76 69 b = a;
Chris@76 70 a = t;
Chris@76 71 }
Chris@76 72
Chris@76 73 a = safe_add(a, olda);
Chris@76 74 b = safe_add(b, oldb);
Chris@76 75 c = safe_add(c, oldc);
Chris@76 76 d = safe_add(d, oldd);
Chris@76 77 e = safe_add(e, olde);
Chris@76 78 }
Chris@76 79 return Array(a, b, c, d, e);
Chris@76 80 }
Chris@76 81
Chris@76 82 /*
Chris@76 83 * Perform the appropriate triplet combination function for the current
Chris@76 84 * iteration
Chris@76 85 */
Chris@76 86 function sha1_ft(t, b, c, d)
Chris@76 87 {
Chris@76 88 if (t < 20) return (b & c) | ((~b) & d);
Chris@76 89 if (t < 40) return b ^ c ^ d;
Chris@76 90 if (t < 60) return (b & c) | (b & d) | (c & d);
Chris@76 91 return b ^ c ^ d;
Chris@76 92 }
Chris@76 93
Chris@76 94 /*
Chris@76 95 * Determine the appropriate additive constant for the current iteration
Chris@76 96 */
Chris@76 97 function sha1_kt(t)
Chris@76 98 {
Chris@76 99 return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
Chris@76 100 (t < 60) ? -1894007588 : -899497514;
Chris@76 101 }
Chris@76 102
Chris@76 103 /*
Chris@76 104 * Calculate the HMAC-SHA1 of a key and some data
Chris@76 105 */
Chris@76 106 function core_hmac_sha1(key, data)
Chris@76 107 {
Chris@76 108 var bkey = str2binb(key);
Chris@76 109 if (bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz);
Chris@76 110
Chris@76 111 var ipad = Array(16), opad = Array(16);
Chris@76 112 for (var i = 0; i < 16; i++)
Chris@76 113 {
Chris@76 114 ipad[i] = bkey[i] ^ 0x36363636;
Chris@76 115 opad[i] = bkey[i] ^ 0x5C5C5C5C;
Chris@76 116 }
Chris@76 117
Chris@76 118 var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz);
Chris@76 119 return core_sha1(opad.concat(hash), 512 + 160);
Chris@76 120 }
Chris@76 121
Chris@76 122 /*
Chris@76 123 * Add integers, wrapping at 2^32. This uses 16-bit operations internally
Chris@76 124 * to work around bugs in some JS interpreters.
Chris@76 125 */
Chris@76 126 function safe_add(x, y)
Chris@76 127 {
Chris@76 128 var lsw = (x & 0xFFFF) + (y & 0xFFFF);
Chris@76 129 var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
Chris@76 130 return (msw << 16) | (lsw & 0xFFFF);
Chris@76 131 }
Chris@76 132
Chris@76 133 /*
Chris@76 134 * Bitwise rotate a 32-bit number to the left.
Chris@76 135 */
Chris@76 136 function rol(num, cnt)
Chris@76 137 {
Chris@76 138 return (num << cnt) | (num >>> (32 - cnt));
Chris@76 139 }
Chris@76 140
Chris@76 141 /*
Chris@76 142 * Convert an 8-bit or 16-bit string to an array of big-endian words
Chris@76 143 * In 8-bit function, characters >255 have their hi-byte silently ignored.
Chris@76 144 */
Chris@76 145 function str2binb(str)
Chris@76 146 {
Chris@76 147 var bin = Array();
Chris@76 148 var mask = (1 << chrsz) - 1;
Chris@76 149 for (var i = 0; i < str.length * chrsz; i += chrsz)
Chris@76 150 bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32);
Chris@76 151 return bin;
Chris@76 152 }
Chris@76 153
Chris@76 154 /*
Chris@76 155 * Convert an array of big-endian words to a string
Chris@76 156 */
Chris@76 157 function binb2str(bin)
Chris@76 158 {
Chris@76 159 var str = "";
Chris@76 160 var mask = (1 << chrsz) - 1;
Chris@76 161 for (var i = 0; i < bin.length * 32; i += chrsz)
Chris@76 162 str += String.fromCharCode((bin[i>>5] >>> (24 - i%32)) & mask);
Chris@76 163 return str;
Chris@76 164 }
Chris@76 165
Chris@76 166 /*
Chris@76 167 * Convert an array of big-endian words to a hex string.
Chris@76 168 */
Chris@76 169 function binb2hex(binarray)
Chris@76 170 {
Chris@76 171 var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
Chris@76 172 var str = "";
Chris@76 173 for (var i = 0; i < binarray.length * 4; i++)
Chris@76 174 {
Chris@76 175 str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +
Chris@76 176 hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);
Chris@76 177 }
Chris@76 178 return str;
Chris@76 179 }
Chris@76 180
Chris@76 181 /*
Chris@76 182 * Convert an array of big-endian words to a base-64 string
Chris@76 183 */
Chris@76 184 function binb2b64(binarray)
Chris@76 185 {
Chris@76 186 var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
Chris@76 187 var str = "";
Chris@76 188 for (var i = 0; i < binarray.length * 4; i += 3)
Chris@76 189 {
Chris@76 190 var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16)
Chris@76 191 | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 )
Chris@76 192 | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF);
Chris@76 193 for (var j = 0; j < 4; j++)
Chris@76 194 {
Chris@76 195 if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
Chris@76 196 else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
Chris@76 197 }
Chris@76 198 }
Chris@76 199 return str;
Chris@76 200 }
Chris@76 201
Chris@76 202 // Character-level replacement function.
Chris@76 203 String.prototype.php_strtr = function (sFrom, sTo) {
Chris@76 204 return this.replace(new RegExp('[' + sFrom + ']', 'g'), function (sMatch) {
Chris@76 205 return sTo.charAt(sFrom.indexOf(sMatch));
Chris@76 206 });
Chris@76 207 }
Chris@76 208
Chris@76 209 // Simulate PHP's strtolower (in SOME cases PHP uses ISO-8859-1 case folding).
Chris@76 210 String.prototype.php_strtolower = function () {
Chris@76 211 return typeof(smf_iso_case_folding) != "undefined" && smf_iso_case_folding == true ? this.php_strtr(
Chris@76 212 'ABCDEFGHIJKLMNOPQRSTUVWXYZ\x8a\x8c\x8e\x9f\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde',
Chris@76 213 'abcdefghijklmnopqrstuvwxyz\x9a\x9c\x9e\xff\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe'
Chris@76 214 ) : this.php_strtr('ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
Chris@76 215 }
Chris@76 216
Chris@76 217 // Convert a string to an 8 bit representation (like in PHP).
Chris@76 218 String.prototype.php_to8bit = function () {
Chris@76 219 if (smf_charset == 'UTF-8')
Chris@76 220 {
Chris@76 221 var n, sReturn = '';
Chris@76 222
Chris@76 223 for (var i = 0, iTextLen = this.length; i < iTextLen; i++)
Chris@76 224 {
Chris@76 225 n = this.charCodeAt(i);
Chris@76 226 if (n < 128)
Chris@76 227 sReturn += String.fromCharCode(n)
Chris@76 228 else if (n < 2048)
Chris@76 229 sReturn += String.fromCharCode(192 | n >> 6) + String.fromCharCode(128 | n & 63);
Chris@76 230 else if (n < 65536)
Chris@76 231 sReturn += String.fromCharCode(224 | n >> 12) + String.fromCharCode(128 | n >> 6 & 63) + String.fromCharCode(128 | n & 63);
Chris@76 232 else
Chris@76 233 sReturn += String.fromCharCode(240 | n >> 18) + String.fromCharCode(128 | n >> 12 & 63) + String.fromCharCode(128 | n >> 6 & 63) + String.fromCharCode(128 | n & 63);
Chris@76 234 }
Chris@76 235
Chris@76 236 return sReturn;
Chris@76 237 }
Chris@76 238 else if (smf_charset == 'ISO-8859-2')
Chris@76 239 {
Chris@76 240 return this.php_strtr(
Chris@76 241 '\u0104\u02d8\u0141\u013d\u026a\u0160\u015e\u0164\u0179\u017d\u017b\u0105\u02db\u0142\u013e\u015b\u02c7\u0161\u015f\u0165\u017a\u02dd\u017e\u017c\u0154\u0102\u0139\u0106\u010c\u0118\u011a\u010e\u0110\u0143\u0147\u0150\u0158\u016e\u0170\u0162\u0155\u0103\u013a\u0107\u010d\u0119\u011b\u010f\u0111\u0144\u0148\u0151\u0159\u016f\u0171\u0163\u02d9',
Chris@76 242 '\xa1\xa2\xa3\xa5\xa6\xa9\xaa\xab\xac\xae\xaf\xb1\xb2\xb3\xb5\xb6\xb7\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc3\xc5\xc6\xc8\xca\xcc\xcf\xd0\xd1\xd2\xd5\xd8\xd9\xdc\xde\xe0\xe3\xe5\xe6\xe8\xea\xec\xef\xf0\xf1\xf2\xf5\xf8\xf9\xfb\xfe\xff'
Chris@76 243 );
Chris@76 244 }
Chris@76 245 else if (smf_charset == 'ISO-8859-9')
Chris@76 246 {
Chris@76 247 return this.php_strtr(
Chris@76 248 '\u011e\u0130\u015e\u011f\u0131\u015f',
Chris@76 249 '\xd0\xdd\xde\xf0\xfd\xfe'
Chris@76 250 );
Chris@76 251 }
Chris@76 252 else if (smf_charset == 'tis-620')
Chris@76 253 {
Chris@76 254 return this.php_strtr(
Chris@76 255 '\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b',
Chris@76 256 '\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb'
Chris@76 257 );
Chris@76 258 }
Chris@76 259 else if (smf_charset == 'windows-1251')
Chris@76 260 {
Chris@76 261 return this.php_strtr(
Chris@76 262 '\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u040e\u045e\u0408\u0490\u0401\u0404\u0407\u0406\u0456\u0491\u0451\u2116\u0454\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f',
Chris@76 263 '\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa1\xa2\xa3\xa5\xa8\xaa\xaf\xb2\xb3\xb4\xb8\xb9\xba\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
Chris@76 264 );
Chris@76 265 }
Chris@76 266 else if (smf_charset == 'windows-1253')
Chris@76 267 {
Chris@76 268 return this.php_strtr(
Chris@76 269 '\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u0385\u0386\u2015\u0384\u0388\u0389\u038a\u038c\u038e\u038f\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03aa\u03ab\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce',
Chris@76 270 '\x80\x82\x83\x84\x85\x86\x87\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x99\x9b\xa1\xa2\xaf\xb4\xb8\xb9\xba\xbc\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe'
Chris@76 271 );
Chris@76 272 }
Chris@76 273 else if (smf_charset == 'windows-1255')
Chris@76 274 {
Chris@76 275 return this.php_strtr(
Chris@76 276 '\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u20aa\u00d7\u00f7\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05b9\u05bb\u05bc\u05bd\u05be\u05bf\u05c0\u05c1\u05c2\u05c3\u05f0\u05f1\u05f2\u05f3\u05f4\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5\u05d6\u05d7\u05d8\u05d9\u05da\u05db\u05dc\u05dd\u05de\u05df\u05e0\u05e1\u05e2\u05e3\u05e4\u05e5\u05e6\u05e7\u05e8\u05e9\u05ea\u200e\u200f',
Chris@76 277 '\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9b\xa4\xaa\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfd\xfe'
Chris@76 278 );
Chris@76 279 }
Chris@76 280 else if (smf_charset == 'windows-1256')
Chris@76 281 {
Chris@76 282 return this.php_strtr(
Chris@76 283 '\u20ac\u067e\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06af\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u06a9\u2122\u0691\u203a\u0153\u200c\u200d\u06ba\u060c\u06be\u061b\u061f\u06c1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063a\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u064b\u064c\u064d\u064e\u064f\u0650\u0651\u0652\u200e\u200f\u06d2',
Chris@76 284 '\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa1\xaa\xba\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe1\xe3\xe4\xe5\xe6\xec\xed\xf0\xf1\xf2\xf3\xf5\xf6\xf8\xfa\xfd\xfe\xff'
Chris@76 285 );
Chris@76 286 }
Chris@76 287 else
Chris@76 288 return this;
Chris@76 289 }