aboutsummaryrefslogtreecommitdiffstats
path: root/src/rng/hmac_rng
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 02:45:00 +0000
committerlloyd <[email protected]>2010-10-13 02:45:00 +0000
commit63121e1e169616f724bf79b8aac1a2b4423c8904 (patch)
tree2375d5b5daaad8990b2cee951d137f2e7638e79b /src/rng/hmac_rng
parent879d062c2b93e32362e338d1c6f9b1eda0f88493 (diff)
Use output_length() instead of OUTPUT_LENGTH pseudo-property
Diffstat (limited to 'src/rng/hmac_rng')
-rw-r--r--src/rng/hmac_rng/hmac_rng.cpp8
1 files changed, 4 insertions, 4 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);
/*