Don't click here unless you want to be banned.

LSL Wiki : LibrarySimpleCypher

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
Really this is just 2 functions (and a bunch of globals) for use in another script. The listen event will take a coma delimited password and string (myPass,myString) and both encode and decode the string with the password. It is merely for testing. Likely to be slow for long strings. This isn't truely secure, any decent computer, or someone with a little spare time and some context, will probably be able to decipher any message in short order.

Also see llXorBase64Strings for a different method of encrypting data.
This is what happens when I pull old scripts out of my inventory - yup, that function will do a better job than this, and was made well after I wrote this script. - AO

// Ama's Simple Cypher v. 0.3

// Feel free to reorganize either of these.  Infact, doing so is recommended.
// Just remember - these must match whatever strings are in the partner script you are communicating with.
string ASCII = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890`-=~!@#$%^&*()_+[]\\{}|;':\",./<>? ";
string CODE = " ABCDEFGHIJKLMNOPQRSTUVWXYZadbcefghijklmnopqrstuvwxyz1234567890`-=~!@#$%^&*()_+[]\\{}|;':\",./<>? ";
string PWD;
integer asciiLength;  // asciiLength = llStringLength(ASCII); in state_entry of default
integer passLength;
string ret;
integer i;
integer bit;
integer size;
list coms;

string encode(string mes, string pwd)
{
    ret = "";
    size = llStringLength(mes);
    passLength = llStringLength(pwd);
    for (i=0;i<size;i++)
    {
        bit = (llSubStringIndex(ASCII,llGetSubString(mes,i,i)) + (integer)llGetSubString(pwd,i%passLength,i%passLength) ) % asciiLength;
        ret +=  llGetSubString(CODE,bit,bit);
    }
    return ret;
}

string decode(string mes, string pwd)
{
    ret = "";
    size = llStringLength(mes);
    passLength = llStringLength(pwd);
    for (i=0;i<size;i++)
    {
        bit = (llSubStringIndex(CODE,llGetSubString(mes,i,i)) - (integer)llGetSubString(pwd,i%passLength,i%passLength) ) % asciiLength;
        ret +=  llGetSubString(ASCII,bit,bit);
    }
    return ret;
}

default
{
    state_entry()
    {
        asciiLength = llStringLength(ASCII);
        llListen(0,"",llGetOwner(),"");
    }

    listen(integer chan, string name, key id, string mes)
    {
        coms = llCSV2List(mes);
        llWhisper(0,encode(llList2String(coms,1),llList2String(coms,0)) + "," + decode(llList2String(coms,1),llList2String(coms,0)));
    }
}


ScriptLibrary / Examples Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah
There is no comment on this page. [Display comments/form]