optimize hash-drbg layout, save 12 bytes on 64bit

This commit is contained in:
toddouska
2015-03-07 09:46:14 -08:00
parent da208e8629
commit ef0a918072
2 changed files with 3 additions and 3 deletions

View File

@@ -149,11 +149,11 @@ enum {
typedef struct DRBG {
Sha256 sha;
word32 reseedCtr;
word32 lastBlock;
byte digest[SHA256_DIGEST_SIZE];
byte V[DRBG_SEED_LEN];
byte C[DRBG_SEED_LEN];
word32 reseedCtr;
word32 lastBlock;
byte matchCount;
} DRBG;

View File

@@ -82,8 +82,8 @@ struct DRBG; /* Private DRBG state */
/* Hash-based Deterministic Random Bit Generator */
typedef struct RNG {
OS_Seed seed;
struct DRBG* drbg;
OS_Seed seed;
byte status;
} RNG;