diff --git a/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCEKParams.cpp b/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCEKParams.cpp index 5a02fdde6..94df996ae 100644 --- a/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCEKParams.cpp +++ b/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCEKParams.cpp @@ -114,19 +114,19 @@ namespace NMR { pXMLNode->parseXML(pXMLReader); std::string result = base64_decode(pXMLNode->getValue()); if(!result.empty()) - m_iv = std::vector(result.begin(), result.end()); + m_iv.insert(m_iv.begin(), result.begin(), result.end()); } else if (strcmp(pChildName, XML_3MF_SECURE_CONTENT_TAG) == 0) { PModelReaderNode_StringValue pXMLNode = std::make_shared(m_pWarnings); pXMLNode->parseXML(pXMLReader); std::string result = base64_decode(pXMLNode->getValue()); if (!result.empty()) - m_tag = std::vector(result.begin(), result.end()); + m_tag.insert(m_tag.begin(), result.begin(), result.end()); } else if (strcmp(pChildName, XML_3MF_SECURE_CONTENT_AAD) == 0) { PModelReaderNode_StringValue pXMLNode = std::make_shared(m_pWarnings); pXMLNode->parseXML(pXMLReader); std::string result = base64_decode(pXMLNode->getValue()); if (!result.empty()) - m_aad = std::vector(result.begin(), result.end()); + m_aad.insert(m_aad.begin(), result.begin(), result.end()); } else { m_pWarnings->addWarning(NMR_ERROR_NAMESPACE_INVALID_ELEMENT, mrwInvalidOptionalValue); } diff --git a/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCipherValue.cpp b/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCipherValue.cpp index 6a4885111..fd2e19ff1 100644 --- a/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCipherValue.cpp +++ b/Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCipherValue.cpp @@ -74,7 +74,7 @@ namespace NMR { try { std::string result = base64_decode(pNode->getValue()); if(!result.empty()) - m_sCipherValue = std::vector(result.begin(), result.end()); + m_sCipherValue.insert(m_sCipherValue.begin(), result.begin(), result.end()); } catch (...) { // base64_decode throws an exception if the input is not valid base64