• Forum
  • Jobs
  • Creat Vigenere Encryptor/Decryptor

 
Creat Vigenere Encryptor/Decryptor

Hello, I need somebody to create a program. Here's the task itself:
https://imgur.com/LOUmdhe

Tell me how much it will cost, and we will make an agreement.

That's what I've done so far:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include<iostream>
#include <fstream>
#include <main.h>
using namespace std;

int main () {
    // WORKING WITH TEXT FILES
    ifstream infile; // intializing a file variable
    ofstream outfile;
    infile.open("text.txt"); // opening file
    string x, y;
    while(!infile.eof()) {
        getline(infile, x); 
        getline(infile, y); // assigning values to x and y from text file
    };
    infile.close(); // closing text file

    // INITILIAZING VARIABLES
    string msg = x;
    string key = y;
    msg = makeUpper(msg);
    key = makeUpper(key);
    msg = spaceEraser(msg);
    key = spaceEraser(key);
    

    int msgLen = msg.length(), keyLen = key.length();

    // CALLING FUNCTIONS
    string newKey = newKeyGen(msgLen, keyLen, key);
    string encryptedMsg = encryptor(msgLen, msg, newKey);
    string decryptedMsg = decryptor(msgLen, encryptedMsg, newKey);

    newKey += '\0';
    // decryptedMsg += '\0';
 
    // PRINTING RESULTS
    cout<<"Original Message: "<<msg;
    cout<<"\nKey: "<<key;
    cout<<"\nNew Generated Key: "<<newKey;
    cout<<"\nEncrypted Message: "<<encryptedMsg;
    cout<<"\nDecrypted Message: "<<decryptedMsg;

    outfile.open("text.txt");
    outfile << encryptedMsg << endl;



 
	return 0;
}
Last edited on
1. How much are you offering?

2. The 3rd case makes no sense.
It mixes up --de and --br, AND supplies a key on the command line.
1. I am not an experienced C++ programmer, so I can't really estimate the price of this.
2. I don't know, that's my uni assignment
> 1. I am not an experienced C++ programmer, so I can't really estimate the price of this.
And getting even less experienced by trying to outsource your homework.

This only ends badly for you in the long run. Even in your best case scenario of staying on the course long enough to get the certificate at the end, that certificate will be useless to you. It might get you a job, but your inability will mean there is no chance of keeping that job.

Worst case, you hand in homework that is so obviously not your own work, and get kicked off the course. They'll just compare the style with your previous efforts.

> 2. I don't know, that's my uni assignment
Well go ask your assignment setter then and find out what is actually wanted.
Vague, incomplete and contradictory requirements are the norm in the real world, get used to it.

Oh, and what have you done about point #1?
"A data structure has to be accepted by a lab tech before implementation".

The first two are easy, should take no more than a couple of hours.

A generic Vigenere solver on the other hand is quite involved.
https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher#Cryptanalysis
About #1 I have not done a thing, I should talk to my lab teacher about it. I don't really know how to run this program in command line with switches, do you know any resources where I could learn it?
#1 of the task is effectively saying that you need to design the program before you start to code it. The data structure used is devised as part of the design process. If this isn't right, then the program has very little chance of working properly. Once it's been accapted by the lab tech, then it can't be changed.

When I did my CS degree many, many years ago, we always had to submit a program design first, get it marked and accepted before coding. This is enforcing good practice that programs should first be designed - not just coded as 'trial and error' until it 'works'

Re command line.

 
int main (int argc, char* argv[])


is the general format of main()

argc is the number of command arguments and argv[] is an array of char* with each element a pointer to an argument. the first agument (argv[0]) is always present and is the name of the program.

eg
myprog arg1 -arg2 arg3 --arg4 arg5

gives:

argc = 6
argv[0] = myprog
argv[1] = arg1
argv[2] = -arg2
argv[3] = arg3
argv[4] = --arg4
argv[5] = arg5

You then need to parse these to determine what options have been specified, are they valid etc etc
How to design the program before start coding it? I've already done a lot of work, it means that it's useless?
> How to design the program before start coding it?
Were you even paying attention in class?

https://en.wikipedia.org/wiki/Software_design
There are a multitude of ways to go about this, so best pick the one that was described in the lectures.

Design is the bridge between the requirements (like in the picture you posted) and the actual program.

You need to figure this out, talk to your tutors about it.
Because how to do a design isn't going to go away.
Actually, I don't want to make any excuses and to argue, but my classes started 2 weeks ago. Literally, we had 4 C++ classes. Nobody told us about Software design, and how we should complete this project. That's why I am asking, because my teachers just ignore me, when I email them. This is the only place, where I can get some help.
https://en.wikipedia.org/wiki/Decomposition_(computer_science)
Design, in the most simplistic terms is producing some kind of plan for how you're going to implement the code.

For you, for this exercise, perhaps it's just sufficient to list 3 functions to satisfy your 3 cases of encrypt, decrypt and break.
Maybe a 4th called analyseCommandLine.

> because my teachers just ignore me, when I email them.
Are you paying for this lack of service?
perhaps it's just sufficient to list 3 functions to satisfy your 3 cases of encrypt, decrypt and break.


I doubt it - as the exercise requires the data structure(s) used to be submitted and accepted before implementation.
Are you paying for this lack of service?
My tuition fees are 1200 euro per semester. That's really too much for such education. I'm going to drop out after the first semester. I think I'll just enter another uni because if I stay here, I'll just waste my time.
Is this a C++ course or a cryptology course? If it's a beginner C++ class then asking for this after 4 classes is expecting rather a lot. If it's a cryptology course, then there may be certain expectations re existing knowledge which you don't have.
Is this a C++ course or a cryptology course? If it's a beginner C++ class then asking for this after 4 classes is expecting rather a lot. If it's a cryptology course, then there may be certain expectations re existing knowledge which you don't have.


The course is "Fundamentals of Computer Programming"
Then I'd say that expecting that exercise to be completed after 4 classes assuming no prior programming knowledge is a big ask. Any comments from your fellow students?
Any comments from your fellow students?

All of us are pissed, all of the projects are complicated. Moreover, in my opinion, I've chosen one of the easiest tasks. The bad thing is that we have only 3 weeks left to complete the project. I think, I'll pass it, but my mates might fail.
Topic archived. No new replies allowed.