Finished project
This commit is contained in:
46
versions/001/old.cpp
Normal file
46
versions/001/old.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
# include<iostream>
|
||||
# include<string>
|
||||
# include<random>
|
||||
# include<cmath>
|
||||
using namespace std;
|
||||
|
||||
int genRandInt(int range_start, int range_end) {
|
||||
random_device dev;
|
||||
mt19937 rng(dev());
|
||||
uniform_int_distribution<mt19937::result_type> dist6(range_start, range_end);
|
||||
return dist6(rng);
|
||||
}
|
||||
|
||||
int genPolyPoints(int poly_func) {
|
||||
}
|
||||
|
||||
int genPoly(int degree) {
|
||||
int poly[degree+1];
|
||||
|
||||
for (int i = 0; i < degree+1; i++) {
|
||||
int random_num = genRandInt(1, 99999999999999999);
|
||||
poly[i] = random_num;
|
||||
}
|
||||
|
||||
return poly;
|
||||
}
|
||||
|
||||
void genSecret(string secret, int shares, int required=shares) {
|
||||
int poly_degree = required - 1;
|
||||
int poly_func = genPoly(poly_degree);
|
||||
int points = genPolyPoints(poly_func)
|
||||
}
|
||||
|
||||
void getShares(int num_shares) {
|
||||
string shares[num_shares];
|
||||
cout << "Enter share secret:\n"
|
||||
cin >> share;
|
||||
cout << "\n"
|
||||
}
|
||||
|
||||
void encodeSecret(string secret) {
|
||||
}
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user