diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 14:09:04 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-08 19:24:00 +0200 |
commit | e4fb171d3ad15ae9abbc93d9db956674498c9dd5 (patch) | |
tree | 6d297c3054a7de5a8baee08db9237d0f01fffb52 /comphelper/source/misc | |
parent | 8e5318b0b971580f8dabecc1318c74e799e84d53 (diff) |
Replaced a few equal calls with ==
Diffstat (limited to 'comphelper/source/misc')
-rw-r--r-- | comphelper/source/misc/docpasswordhelper.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx index 3619b2846a45..2be579e43086 100644 --- a/comphelper/source/misc/docpasswordhelper.cxx +++ b/comphelper/source/misc/docpasswordhelper.cxx @@ -116,18 +116,17 @@ sal_Bool DocPasswordHelper::IsModifyPasswordCorrect( const ::rtl::OUString& aPas for ( sal_Int32 nInd = 0; nInd < aInfo.getLength(); nInd++ ) { - if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "algorithm-name" ) ) ) ) + if ( aInfo[nInd].Name == "algorithm-name" ) aInfo[nInd].Value >>= sAlgorithm; - else if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "salt" ) ) ) ) + else if ( aInfo[nInd].Name == "salt" ) aInfo[nInd].Value >>= aSalt; - else if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "iteration-count" ) ) ) ) + else if ( aInfo[nInd].Name == "iteration-count" ) aInfo[nInd].Value >>= nCount; - else if ( aInfo[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hash" ) ) ) ) + else if ( aInfo[nInd].Name == "hash" ) aInfo[nInd].Value >>= aHash; } - if ( sAlgorithm.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PBKDF2" ) ) ) - && aSalt.getLength() && nCount > 0 && aHash.getLength() ) + if ( sAlgorithm == "PBKDF2" && aSalt.getLength() && nCount > 0 && aHash.getLength() ) { uno::Sequence< sal_Int8 > aNewHash = GeneratePBKDF2Hash( aPassword, aSalt, nCount, aHash.getLength() ); for ( sal_Int32 nInd = 0; nInd < aNewHash.getLength() && nInd < aHash.getLength() && aNewHash[nInd] == aHash[nInd]; nInd ++ ) |