diff options
Diffstat (limited to 'src/sym_algo/symkey.cpp')
-rw-r--r-- | src/sym_algo/symkey.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/sym_algo/symkey.cpp b/src/sym_algo/symkey.cpp index e8b9ddd21..56648d9c5 100644 --- a/src/sym_algo/symkey.cpp +++ b/src/sym_algo/symkey.cpp @@ -28,11 +28,8 @@ OctetString::OctetString(RandomNumberGenerator& rng, */ void OctetString::change(const std::string& hex_string) { - SecureVector<byte> decoded(1 + hex_string.length() / 2); - - size_t written = hex_decode(&decoded[0], hex_string); - - bits.set(&decoded[0], written); + bits.resize(1 + hex_string.length() / 2); + bits.resize(hex_decode(&bits[0], hex_string)); } /* |