Browse Source

change fortuna_prng.wd to ulong64

Karel Miko 7 years ago
parent
commit
a8aa207381
2 changed files with 3 additions and 4 deletions
  1. 2 3
      src/headers/tomcrypt_prng.h
  2. 1 1
      src/prngs/fortuna.c

+ 2 - 3
src/headers/tomcrypt_prng.h

@@ -40,9 +40,8 @@ struct fortuna_prng {
                   IV[16];     /* IV for CTR mode */
 
     unsigned long pool_idx,   /* current pool we will add to */
-                  pool0_len,  /* length of 0'th pool */
-                  wd;
-
+                  pool0_len;  /* length of 0'th pool */
+    ulong64       wd;
     ulong64       reset_cnt;  /* number of times we have reseeded */
 };
 #endif

+ 1 - 1
src/prngs/fortuna.c

@@ -93,7 +93,7 @@ static int _fortuna_reseed(prng_state *prng)
    int           err, x;
 
 #ifdef LTC_FORTUNA_RESEED_RATELIMIT_TIMED
-   unsigned long now = _fortuna_current_time();
+   ulong64 now = _fortuna_current_time();
    if (now == prng->fortuna.wd)
       return CRYPT_OK;
 #else