chore: edit printf formatting and comments

[skip ci]
This commit is contained in:
surtur 2021-10-27 18:53:53 +02:00
parent c0efa75c1a
commit 65b081dc30
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -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