diff options
author | lloyd <[email protected]> | 2010-10-13 02:45:00 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-13 02:45:00 +0000 |
commit | 63121e1e169616f724bf79b8aac1a2b4423c8904 (patch) | |
tree | 2375d5b5daaad8990b2cee951d137f2e7638e79b /src/rng | |
parent | 879d062c2b93e32362e338d1c6f9b1eda0f88493 (diff) |
Use output_length() instead of OUTPUT_LENGTH pseudo-property
Diffstat (limited to 'src/rng')
-rw-r--r-- | src/rng/hmac_rng/hmac_rng.cpp | 8 | ||||
-rw-r--r-- | src/rng/randpool/randpool.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp index a3456d9e0..7912e58af 100644 --- a/src/rng/hmac_rng/hmac_rng.cpp +++ b/src/rng/hmac_rng/hmac_rng.cpp @@ -167,14 +167,14 @@ HMAC_RNG::HMAC_RNG(MessageAuthenticationCode* extractor_mac, MessageAuthenticationCode* prf_mac) : extractor(extractor_mac), prf(prf_mac) { - if(!prf->valid_keylength(extractor->OUTPUT_LENGTH) || - !extractor->valid_keylength(prf->OUTPUT_LENGTH)) + if(!prf->valid_keylength(extractor->output_length()) || + !extractor->valid_keylength(prf->output_length())) throw Invalid_Argument("HMAC_RNG: Bad algo combination " + extractor->name() + " and " + prf->name()); // First PRF inputs are all zero, as specified in section 2 - K.resize(prf->OUTPUT_LENGTH); + K.resize(prf->output_length()); counter = 0; user_input_len = 0; @@ -193,7 +193,7 @@ HMAC_RNG::HMAC_RNG(MessageAuthenticationCode* extractor_mac, the estimated entropy counter is high enough. That variable is only set when a reseeding is performed. */ - MemoryVector<byte> prf_key(extractor->OUTPUT_LENGTH); + MemoryVector<byte> prf_key(extractor->output_length()); prf->set_key(prf_key); /* diff --git a/src/rng/randpool/randpool.cpp b/src/rng/randpool/randpool.cpp index d99ae5463..e66081a07 100644 --- a/src/rng/randpool/randpool.cpp +++ b/src/rng/randpool/randpool.cpp @@ -176,7 +176,7 @@ Randpool::Randpool(BlockCipher* cipher_in, mac(mac_in) { const size_t BLOCK_SIZE = cipher->BLOCK_SIZE; - const size_t OUTPUT_LENGTH = mac->OUTPUT_LENGTH; + const size_t OUTPUT_LENGTH = mac->output_length(); if(OUTPUT_LENGTH < BLOCK_SIZE || !cipher->valid_keylength(OUTPUT_LENGTH) || |