aboutsummaryrefslogtreecommitdiffstats
path: root/src/sym_algo/symkey.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-17 05:03:06 +0000
committerlloyd <[email protected]>2009-11-17 05:03:06 +0000
commit0d27bc0f8763cb6dd6307dbab7713058dee18b2c (patch)
tree5cb428e1c4475ca24f1e4a84dfdc07c7a9e91393 /src/sym_algo/symkey.cpp
parent0753d6e2c478430d8cd1a0df8d21f68a05260300 (diff)
Rename/remove some secmem member variables for better matching with STL
containers (specifically vector). Rename is_empty to empty Remove has_items Rename create to resize
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);
}