-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCipherSolve.c
More file actions
49 lines (42 loc) · 978 Bytes
/
CipherSolve.c
File metadata and controls
49 lines (42 loc) · 978 Bytes
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
// Author - Michael Ibeh
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "CipherSolve.h"
int main(void){
int choice = 0;
while(choice != 7){
printf("\nWhat would you like to do?\n");
printf("1. Decrypt a shift cipher (Brute Force)\n");
printf("2. Encrypt a shift cipher\n");
printf("3. Decrypt a message encrypted with the affine cipher (Brute Force)\n");
printf("4. Encrypt a message encrypted with the affine cipher\n");
printf("5. Decrypt a message encrypted with the Vigenere cipher (with key)\n");
printf("6. Encrypt a message using the Vigenere cipher\n");
printf("7. Quit\n");
scanf("%d", &choice);
switch(choice){
case 1:
shift_decrypt();
break;
case 2:
shift_encrypt();
break;
case 3:
affine_decrypt();
break;
case 4:
affine_encrypt();
break;
case 5:
vigenere_decrypt();
break;
case 6:
vigenere_encrypt();
break;
}
}
return 0;
}