From 948cb738925817a79b9a0f4671c3deb14abc513d Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 23 Mar 2011 14:13:24 +0100 Subject: mav60: #164341# fix problems with the new implementation --- comphelper/source/misc/storagehelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index ae3c14c58d5b..0a4cddc6d066 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -462,7 +462,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( rtl_TextEncoding pEncoding[2] = { RTL_TEXTENCODING_UTF8, RTL_TEXTENCODING_MS_1252 }; - for ( sal_Int32 nInd = nSha1Ind; nInd < nSha1Ind + 2; nInd++ ) + for ( sal_Int32 nInd = 0; nInd < 2; nInd++ ) { ::rtl::OString aByteStrPass = ::rtl::OUStringToOString( aPassword, pEncoding[nInd] ); @@ -478,7 +478,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( break; } - aEncryptionData[nInd].Value <<= uno::Sequence< sal_Int8 >( (sal_Int8*)pBuffer, RTL_DIGEST_LENGTH_SHA1 ); + aEncryptionData[nSha1Ind+nInd].Value <<= uno::Sequence< sal_Int8 >( (sal_Int8*)pBuffer, RTL_DIGEST_LENGTH_SHA1 ); } } -- cgit