Note that the forum may have inserted spaces in the strings near the start - there should be no spaces in them, and no returns or anything similar. Also - technically chref doesn't need to be that long, but I left those in for future expansion to maybe actually do some proper data compression.

CODE
// 4 bits per char, boo.
string hexchars = "0123456789abcdef";
// 6 bits per char, yay!
string chref = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()[]{}?+-_\|',.<>~`;:";
string crunchkey(key thekey) {
integer t;
string skey = (string)thekey;
integer buffbits = 0;
integer buffval = 0;
string outkey = "";
for (t=0; t<36; t++) {
string curchar = llGetSubString(skey,t,t);
if (curchar != "-") {
integer curval = llSubStringIndex(hexchars,curchar);
buffval+=(curval << buffbits);
buffbits+=4;
if (buffbits > 5) {
integer lval = buffval & 63;
outkey += llGetSubString(chref,lval,lval);
buffval = buffval >> 6;
buffbits -= 6;
}
}
}
outkey += llGetSubString(chref,buffval,buffval);
return outkey;
}
key uncrunchkey(string crunched) {
integer t;
string outkey;
integer buffbits = 0;
integer buffval = 0;
integer outchars = 0;
for (t=0; t<22; t++) {
string curchar = llGetSubString(crunched,t,t);
integer curval = llSubStringIndex(chref,curchar);
buffval += (curval << buffbits);
buffbits += 6;
while (buffbits > 3) {
integer lval = buffval & 15;
if (outchars < 32) outkey += llGetSubString(hexchars,lval,lval);
outchars++;
if (outchars == 8) outkey += "-";
if (outchars == 12) outkey += "-";
if (outchars == 16) outkey += "-";
if (outchars == 20) outkey += "-";
buffval = buffval >> 4;
buffbits -= 4;
}
}
return (key)outkey;
}