parent
c0efa75c1a
commit
65b081dc30
|
@ -20,6 +20,7 @@ G_state *initialize_generator(){
|
|||
|
||||
string do_crypto(long k, unsigned __int128 ctr){
|
||||
/* this function calls the block cipher
|
||||
* returns a string of k*(16 bytes);
|
||||
do whatever atm */
|
||||
k = 0;
|
||||
ctr = 0;
|
||||
|
@ -42,10 +43,10 @@ tuple<string, G_state> generate_random_data(G_state G, uint n){
|
|||
string r = "";
|
||||
if (n < 0){
|
||||
/* this should not be possible */
|
||||
printf("[*] error: n cannot be < 0");
|
||||
printf("[*] error: n cannot be < 0\n");
|
||||
throw invalid_argument("n cannot be < 0");
|
||||
} else if (n > pow(2,20)){
|
||||
printf("[*] error: n cannot be > 2^20");
|
||||
printf("[*] error: n cannot be > 2^20\n");
|
||||
throw invalid_argument("n cannot be > 2^20");
|
||||
}
|
||||
/* do magic to compute r
|
||||
|
|
Reference in New Issue