aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac
diff options
context:
space:
mode:
Diffstat (limited to 'src/mac')
-rw-r--r--src/mac/cmac/cmac.cpp8
-rw-r--r--src/mac/hmac/hmac.cpp4
-rw-r--r--src/mac/ssl3mac/ssl3_mac.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp
index 58923138b..b689a4d3a 100644
--- a/src/mac/cmac/cmac.cpp
+++ b/src/mac/cmac/cmac.cpp
@@ -144,10 +144,10 @@ CMAC::CMAC(BlockCipher* e_in) :
else
throw Invalid_Argument("CMAC cannot use the cipher " + e->name());
- state.create(OUTPUT_LENGTH);
- buffer.create(OUTPUT_LENGTH);
- B.create(OUTPUT_LENGTH);
- P.create(OUTPUT_LENGTH);
+ state.resize(OUTPUT_LENGTH);
+ buffer.resize(OUTPUT_LENGTH);
+ B.resize(OUTPUT_LENGTH);
+ P.resize(OUTPUT_LENGTH);
position = 0;
}
diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp
index 99be479fa..dcd6bce5d 100644
--- a/src/mac/hmac/hmac.cpp
+++ b/src/mac/hmac/hmac.cpp
@@ -92,8 +92,8 @@ HMAC::HMAC(HashFunction* hash_in) :
if(hash->HASH_BLOCK_SIZE == 0)
throw Invalid_Argument("HMAC cannot be used with " + hash->name());
- i_key.create(hash->HASH_BLOCK_SIZE);
- o_key.create(hash->HASH_BLOCK_SIZE);
+ i_key.resize(hash->HASH_BLOCK_SIZE);
+ o_key.resize(hash->HASH_BLOCK_SIZE);
}
}
diff --git a/src/mac/ssl3mac/ssl3_mac.cpp b/src/mac/ssl3mac/ssl3_mac.cpp
index 23a636424..a4c0c635e 100644
--- a/src/mac/ssl3mac/ssl3_mac.cpp
+++ b/src/mac/ssl3mac/ssl3_mac.cpp
@@ -83,8 +83,8 @@ SSL3_MAC::SSL3_MAC(HashFunction* hash_in) :
u32bit INNER_HASH_LENGTH =
(hash->name() == "SHA-160") ? 60 : hash->HASH_BLOCK_SIZE;
- i_key.create(INNER_HASH_LENGTH);
- o_key.create(INNER_HASH_LENGTH);
+ i_key.resize(INNER_HASH_LENGTH);
+ o_key.resize(INNER_HASH_LENGTH);
}
}