aboutsummaryrefslogtreecommitdiffstats
path: root/src/sym_algo/symkey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sym_algo/symkey.cpp')
-rw-r--r--src/sym_algo/symkey.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sym_algo/symkey.cpp b/src/sym_algo/symkey.cpp
index 32dfe68d5..e309f56ab 100644
--- a/src/sym_algo/symkey.cpp
+++ b/src/sym_algo/symkey.cpp
@@ -20,7 +20,7 @@ namespace Botan {
OctetString::OctetString(RandomNumberGenerator& rng,
u32bit length)
{
- bits.create(length);
+ bits.resize(length);
rng.randomize(bits, length);
}
@@ -36,7 +36,7 @@ void OctetString::change(const std::string& hex_string)
if(hex.size() % 2 != 0)
throw Invalid_Argument("OctetString: hex string must encode full bytes");
- bits.create(hex.size() / 2);
+ bits.resize(hex.size() / 2);
for(u32bit j = 0; j != bits.size(); ++j)
bits[j] = Hex_Decoder::decode(hex.begin() + 2*j);
}
@@ -46,7 +46,7 @@ void OctetString::change(const std::string& hex_string)
*/
void OctetString::change(const byte in[], u32bit n)
{
- bits.create(n);
+ bits.resize(n);
bits.copy(in, n);
}