mercredi 25 novembre 2015

How to unhash through a "Jacob's Ladder"?

I am trying to write a program that unhashes a 32 bit word into a platitude of other bytes. Based only on the calculus I'm using to create a pattern-esque representation of the key phrase and one inferred 32 bit word, how can I unhash this and make it happen to be clear of loss and other such drawbacks of hashing? This is going to be for a secret project of mine.

int S_Rend::s_render(ifstream& in, ofstream& out) {

    long size=0;
    long t;
    if (!(in.is_open()))
    { return -1; }
    else {
    t=(long&)beta;

    for_each (std::istreambuf_iterator<char>(in), \
        std::istreambuf_iterator<char>(), \
        [&] (int x) {
        t=s_nop((long&)t,0);
        cred.push_back(t);
        alpha = (long&)cred[size];
        delta = (long&)x;
        kappa ^= (alpha ^ delta);
        kappa = 1 + (long&)kappa;
        size++;
    });
        printf("*");
    }
    if (out.is_open())
    { out << lambda << endl;
        out << size << endl;
            out << cred[size] << endl; }

    else { return -1; }

    return 0;
}
int S_Rend::unrender(ifstream& in, ofstream& out) {

    long i, n;
    long size;
    long t;
    long chk;
    in >> kappa_copy;
    in >> size;
    in >> chk;
    t=(long&)beta;
    long bn=0;

    kappa=kappa_copy;
    while (size-1>=bn) {
        t=s_nop((long&)t,0);
        cred.push_back(t);
        bn++;       
    }

    if (cred[bn]==chk)
        cout << "\nValidity Pass... Success!" << endl;
    else {
        printf("\nValidity Pass...Fail! %u != %u",cred[cred.size()-1],chk);
        return 1;
    }

    cout << "\nWriting to Buffer..." << endl;

    vector<long> btrace;

    kappa = (long&)kappa_copy - 1;

    alpha=(long&)cred[cred.size()-1];
    bn=1;
    while (cred.size()-1>=bn) {

        if (kappa_copy == (kappa ^ delta ^ alpha) ) {
            alpha=(long&)cred[bn];
            btrace.push_back((long&)delta);
            kappa_copy = (long&)kappa_copy - 1;
            for (i=0;i<=31;i++) (kappa[i] == (kappa_copy[i] ^ 1 ^ alpha[i]) ? delta[i]=1 : delta[i]=0);
            kappa = (delta ^ alpha);
            bn++;
        }
        if (kappa_copy == 0x00 && bn==cred.size()-1)
            printf("lflfdl");

        for (i=0;i<=31;i++) (kappa_copy[i] == (kappa[i] ^ 1 ^ alpha[i])  ? delta[i]=1 : delta[i]=0);

    }
    cout << "One more second..\n";
    bn=1;

    while (bn<=btrace.size()-1) {
        bn++;
        out << (const char)(long&)btrace[bn-1];
    }

    cout << "\nBuffer Written... Exiting..\n";
    in.close();
    out.close();
    printf("*");
    return 0;
}

Aucun commentaire:

Enregistrer un commentaire