-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdafx.hpp
More file actions
39 lines (30 loc) · 1.02 KB
/
Copy pathstdafx.hpp
File metadata and controls
39 lines (30 loc) · 1.02 KB
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
#pragma once
#include <bits/stdc++.h>
#include <raylib.h>
#include <string>
#include <bitset>
#define SCREEN_WIDTH 1200
#define SCREEN_HEIGHT 800
#define OUTER_PADDING 5
#define INNER_PADDING 10
#define RATIO_2_5 2./5
#define RATIO_3_5 3./5
#define RATIO_1_2 1./2
#define FONT_SPACING 1
#define P 11
#define Q 23
#define N P * Q
#define E 31
using namespace std;
void str_to_bin(const char* str, int str_len, char* bin, int* bin_len);
void bin_to_c2b1q(char* bin, int bin_len, char* cod, int* cod_len);
int PotModN(int base, int power, int modulus);
string encrypt(string& str, int publicKey, int modulus);
void bin_to_str(char* bin, int bin_len, char* str, int* str_len);
void c2b1q_to_bin(char* cod, int cod_len, char* bin, int* bin_len);
int extendedEuclides(int e, int totiente);
void GetPrivateKey(unsigned char *privateKey);
string decrypt(string& str, int privateKey, int modulus);
string encryptTemp(string& str, int key);
string decryptTemp(string& str, int key);
void convertToVector(vector<int>& d, string receivedMessage);