ctr should never be negative, use unsigned
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
88414b445d
commit
cb4bca0b30
|
@ -7,7 +7,8 @@ using namespace std;
|
|||
|
||||
struct G_state{
|
||||
long k;
|
||||
long ctr;
|
||||
// TODO: use __int128 for ctr eventually;
|
||||
unsigned long ctr;
|
||||
};
|
||||
|
||||
G_state *initialize_generator(){
|
||||
|
@ -17,7 +18,7 @@ G_state *initialize_generator(){
|
|||
return G;
|
||||
};
|
||||
|
||||
string do_crypto(long k, long ctr){
|
||||
string do_crypto(long k, unsigned long ctr){
|
||||
/* this function calls the block cipher
|
||||
do whatever atm */
|
||||
k = 0;
|
||||
|
|
|
@ -9,7 +9,7 @@ struct G_state;
|
|||
/* initializes generator */
|
||||
G_state *initialize_generator();
|
||||
|
||||
std::string do_crypto(long k, long ctr);
|
||||
std::string do_crypto(long k, unsigned long ctr);
|
||||
|
||||
G_state generate_blocks(G_state G, int k_blocks);
|
||||
|
||||
|
|
Reference in New Issue