Thread: Encryption

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    2

    Question Encryption

    I am learning encryption in C++. I read the tutoril on OR-Encryption. I tried to get input from the user and encrypt that phrase, but the compiler said that was forbidden. Here is what I had:

    #include <iostream.h>
    #include <stdlib.h>

    int main()
    {

    char string[11];

    cout << "Enter the phrase to be encrypted: ";
    cin >> string;

    char key[11] = "ABCDEFGHIJ";

    for (int x = 0; x < 10; x++)
    {
    string[x] = string[x]^key[x];
    cout << string[x];
    }

    cout << endl;

    system("PAUSE");
    return 0;
    }

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    2

    Talking

    Never mind. Got it running!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. help needed with edit control & encryption
    By willc0de4food in forum Windows Programming
    Replies: 2
    Last Post: 03-16-2006, 08:21 PM
  3. abt encryption algorithm
    By purIn in forum C Programming
    Replies: 9
    Last Post: 12-22-2003, 10:16 PM
  4. What's wrong with my Stream Cipher Encryption?
    By Davros in forum C++ Programming
    Replies: 3
    Last Post: 04-18-2002, 09:51 PM
  5. File Encryption & Read/Write in Binary Mode
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 11-30-2001, 06:45 PM