-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEncrypt.h
78 lines (73 loc) · 1.54 KB
/
Encrypt.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#pragma once
#include "stdafx.h"
#include <stdio.h>
#include <cstdlib>
#include <Windows.h> // use < > for all system and library headers
#include <winuser.h>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <complex>
#include <string>
using namespace std;
void encryptionbone() {
cryptChar = 0;
key = "";
ifstream readere("bone.txt");
if (!readere) {
}
else {
for (int i = 0; !readere.eof(); i++) {
readere.get(letter);
key += letter;
}
readere.close();
}
key.pop_back();
cryptMessage += "*";
while (cryptMessage[cryptChar] != '*') {
keyChar = 0;
while (uncyrptable[keyChar] != '_') {
if (uncyrptable[keyChar] == '*') { // also for caps
}
if (cryptMessage[cryptChar] == uncyrptable[keyChar]) { // also for caps
cryptMessage[cryptChar] = key[keyChar];
keyChar = 67;
}
keyChar++;
}
cryptChar++;
}
cryptMessage.pop_back();
}
void encryptionbtwo() {
cryptChar = 0;
key = "";
ifstream readerer("btwo.txt");
if (!readerer) {
cout << "WHAT NOOOO (It didn't work)" << endl;
}
else {
for (int i = 0; !readerer.eof(); i++) {
readerer.get(letter);
key += letter;
}
readerer.close();
}
key.pop_back();
cryptMessage += "*";
while (cryptMessage[cryptChar] != '*') {
keyChar = 0;
while (uncyrptable[keyChar] != '_') {
if (uncyrptable[keyChar] == '*') { // also for caps
}
if (cryptMessage[cryptChar] == uncyrptable[keyChar]) { // also for caps
cryptMessage[cryptChar] = key[keyChar];
keyChar = 67;
}
keyChar++;
}
cryptChar++;
}
cryptMessage.pop_back();
}