Author | I would like some guidance |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
i want to make a translator, to encrypt my own text and whatnot, preferably in vb or c++ |
 |
Author | RE: I would like some guidance |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
So what guidance do you need?
|
 |
Author | RE: I would like some guidance |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
send me to an article or a tutorial, or something |
 |
Author | RE: I would like some guidance |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
I don't know of any articles or tutorials but you could always look one up....Do you know any C++?
|
 |
Author | RE: I would like some guidance |
richohealey Member

Posts: 1022 Location: #!/usr/local/bin/python
Joined: 01.05.06 Rank: Monster | |
so you want a step by step guide to making exactly what you want? if you're going to do that just download some premade code. fark.
learn some strnig amnipulation in either language. from there it's a piece of piss.
|
 |
Author | RE: I would like some guidance |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
string manipulation here i come |
 |
Author | RE: Simple encryption |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
/* Here is some code you can use to very lightly encrypt a string */
/* This if just off the top of my head, so the non-production quality */
/* should be pretty obvious And this is in C, not C++, as C is my */
/* personal language of choice. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
char to_be_encrypted[50];
char encrypted_string[50];
char key = 'H';
int index;
printf("Input a string to be encrypted: " );
gets(to_be_encrypted);
for (index = 0; index < strlen(to_be_encrypted); index++) {
encrypted_string[index] = to_be_encrypted[index] ^ key;
/* ^ character is for binary XOR operation */
}
encrypted_string[index] = '\0';
/* Add terminating null character to string*/
printf("\nYour encrypted string is: %s",encrypted_string);
for (index = 0; index < strlen(encrypted_string); index++) {
encrypted_string[index] ^= key;
/* You can decrypt with the same key */
}
printf("\nYour decrypted string is: %s\n",encrypted_string);
return 0;
}
|
 |
Author | RE: I suppose I should mention |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
In the event that you get a character and a key that XOR out to a binary 0 (01001100 XOR 01001100 for example), the printf( "%s" ) will only print the characters before the NULL terminator. Easy to circumvent, I just thought I should mention it.
Also, this exact style of encryption is used for a certain unnamed App challenge, for those of you who might have needed a hint 
/* Bah, damn smilies */
Edited by on 12-10-06 05:20 |
 |
Author | RE: I would like some guidance |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
alright, and how can i loop a command, thanks for your help by the way, i want to loop a msgbox command and i have no clue, google isnt helping |
 |
Author | RE: I would like some guidance |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
nevermind i went for the ol
do while (1=1)
msgbox ("YOU LOVE MIDGET PORN"
loop |
 |