Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

how2reversethisshit

Name: Anonymous 2012-11-08 0:13

So I'm trying to build a shitty text encryption proggy, however, I'm stuck @ the part where I'm supposed to revert it back to normal.

So what's the problem in this code?

#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

int main()
{
    char userluv[800], orig[800], key [51], priv [21];
    int tempfussd[800], kint, pint, tint[5], c;

    //get the basic info
    cout << "key? ";
    gets(key);
    cout << "Second key? ";
    gets(priv);
    cout << "Your lovely text?:";
    cin.get();
    gets(userluv);

    for(c=0; c<=key[c]; c++){
        kint += key[c];
    }
    for(c=0; c<=priv[c]; c++){
        pint += priv[c];
    }


    //do shit to your key
    tint[0] = strlen(key) + strlen(priv);
    tint[1] = tint[0] * tint[0];


    //string to int then do shit :S
        for(c=0; c<=userluv[c]; c++){
        tempfussd[c] = userluv[c];
        tempfussd[c] += kint;
        tempfussd[c] *= pint;
        tempfussd[c] *= tint[1];
        cout << tempfussd[c];
    }

        cout << "\n";

    //testing purposes
        for(c=0; c<=userluv[c]; c++){
        orig[c] = tempfussd[c];
        orig[c] %= tint[1];
        orig[c] %= pint;
        orig[c] -= kint;
        cout << orig[c];
    }

    return 0;
}

Name: Anonymous 2012-11-08 5:47

The problem is that it's not in code tags. Here you go OP
#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

int main()
{
    char userluv[800], orig[800], key [51], priv [21];
    int tempfussd[800], kint, pint, tint[5], c;

    //get the basic info
    cout << "key? ";
    gets(key);
    cout << "Second key? ";
    gets(priv);
    cout << "Your lovely text?:";
    cin.get();
    gets(userluv);

    for(c=0; c<=key[c]; c++){
        kint += key[c];
    }
    for(c=0; c<=priv[c]; c++){
        pint += priv[c];
    }


    //do shit to your key
    tint[0] = strlen(key) + strlen(priv);
    tint[1] = tint[0] * tint[0];


    //string to int then do shit :S
        for(c=0; c<=userluv[c]; c++){
        tempfussd[c] = userluv[c];
        tempfussd[c] += kint;
        tempfussd[c] *= pint;
        tempfussd[c] *= tint[1];
        cout << tempfussd[c];
    }

        cout << "\n";

    //testing purposes
        for(c=0; c<=userluv[c]; c++){
        orig[c] = tempfussd[c];
        orig[c] %= tint[1];
        orig[c] %= pint;
        orig[c] -= kint;
        cout << orig[c];
    }

    return 0;
}

Name: Anonymous 2012-11-08 5:55

#include <iostream>
stopped reading right there

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-11-08 5:59

Wrap it in a Feistel network and use it as a round function.

(Multiplications and divisions are usually avoided in encryption algorithms.)

Name: Anonymous 2012-11-08 7:25

>>4
Fuck off, Cudder.

Name: Anonymous 2012-11-08 8:57

using namespace std;
stopped reading right there

Name: Anonymous 2012-11-08 9:03

gets

Name: Anonymous 2012-11-08 13:25

Symta:
@|>@(#,<)

C++:

#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

int main()
{
    char userluv[800], orig[800], key [51], priv [21];
    int tempfussd[800], kint, pint, tint[5], c;

    //get the basic info
    cout << "key? ";
    gets(key);
    cout << "Second key? ";
    gets(priv);
    cout << "Your lovely text?:";
    cin.get();
    gets(userluv);

    for(c=0; c<=key[c]; c++){
        kint += key[c];
    }
    for(c=0; c<=priv[c]; c++){
        pint += priv[c];
    }


    //do shit to your key
    tint[0] = strlen(key) + strlen(priv);
    tint[1] = tint[0] * tint[0];


    //string to int then do shit :S
        for(c=0; c<=userluv[c]; c++){
        tempfussd[c] = userluv[c];
        tempfussd[c] += kint;
        tempfussd[c] *= pint;
        tempfussd[c] *= tint[1];
        cout << tempfussd[c];
    }

        cout << "\n";

    //testing purposes
        for(c=0; c<=userluv[c]; c++){
        orig[c] = tempfussd[c];
        orig[c] %= tint[1];
        orig[c] %= pint;
        orig[c] -= kint;
        cout << orig[c];
    }

    return 0;
}

Name: Anonymous 2012-11-08 13:28

>>8
fuck I lol'd

Name: Anonymous 2012-11-08 13:32

>#include
stopped reading right there

Name: Anonymous 2012-11-08 13:35

>>8
what's the point of posting shitta code if we don't even know what it does

give us documentation or fuck off

>>10
why are the retards from the imageboards such insufferable kikes

Name: Anonymous 2012-11-08 15:36

>>8
Your compiler is really coming along nicely.

Don't change these.
Name: Email:
Entire Thread Thread List