diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-22 20:37:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-23 07:40:24 +0100 |
commit | 2976a37ff7039d521c4d15a8387e9db9b27f89d8 (patch) | |
tree | 8462d9c2dd1d08db3d255d75fb4d44e3c7a556a9 /svl/source/misc/PasswordHelper.cxx | |
parent | 2aa76522881bd92ddc4daeaabcb30a6938291afc (diff) |
sal_Char->char in svtools..svl
Change-Id: Ideb61209e8795865bce6e0b1d667b34f8a8db4d9
Reviewed-on: https://gerrit.libreoffice.org/85713
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source/misc/PasswordHelper.cxx')
-rw-r--r-- | svl/source/misc/PasswordHelper.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/svl/source/misc/PasswordHelper.cxx b/svl/source/misc/PasswordHelper.cxx index 4f8cbb655b08..5f2e286e1ef5 100644 --- a/svl/source/misc/PasswordHelper.cxx +++ b/svl/source/misc/PasswordHelper.cxx @@ -33,7 +33,7 @@ void SvPasswordHelper::GetHashPasswordSHA256(uno::Sequence<sal_Int8>& rPassHash, ::comphelper::HashType::SHA256)); rPassHash.realloc(hash.size()); ::std::copy(hash.begin(), hash.end(), rPassHash.begin()); - rtl_secureZeroMemory(const_cast<sal_Char *>(tmp.getStr()), tmp.getLength()); + rtl_secureZeroMemory(const_cast<char *>(tmp.getStr()), tmp.getLength()); } void SvPasswordHelper::GetHashPasswordSHA1UTF8(uno::Sequence<sal_Int8>& rPassHash, OUString const& rPassword) @@ -44,10 +44,10 @@ void SvPasswordHelper::GetHashPasswordSHA1UTF8(uno::Sequence<sal_Int8>& rPassHas ::comphelper::HashType::SHA1)); rPassHash.realloc(hash.size()); ::std::copy(hash.begin(), hash.end(), rPassHash.begin()); - rtl_secureZeroMemory(const_cast<sal_Char *>(tmp.getStr()), tmp.getLength()); + rtl_secureZeroMemory(const_cast<char *>(tmp.getStr()), tmp.getLength()); } -void SvPasswordHelper::GetHashPassword(uno::Sequence<sal_Int8>& rPassHash, const sal_Char* pPass, sal_uInt32 nLen) +void SvPasswordHelper::GetHashPassword(uno::Sequence<sal_Int8>& rPassHash, const char* pPass, sal_uInt32 nLen) { rPassHash.realloc(RTL_DIGEST_LENGTH_SHA1); @@ -61,13 +61,13 @@ void SvPasswordHelper::GetHashPassword(uno::Sequence<sal_Int8>& rPassHash, const void SvPasswordHelper::GetHashPasswordLittleEndian(uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass) { sal_Int32 nSize(sPass.getLength()); - std::unique_ptr<sal_Char[]> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]); + std::unique_ptr<char[]> pCharBuffer(new char[nSize * sizeof(sal_Unicode)]); for (sal_Int32 i = 0; i < nSize; ++i) { sal_Unicode ch(sPass[ i ]); - pCharBuffer[2 * i] = static_cast< sal_Char >(ch & 0xFF); - pCharBuffer[2 * i + 1] = static_cast< sal_Char >(ch >> 8); + pCharBuffer[2 * i] = static_cast< char >(ch & 0xFF); + pCharBuffer[2 * i + 1] = static_cast< char >(ch >> 8); } GetHashPassword(rPassHash, pCharBuffer.get(), nSize * sizeof(sal_Unicode)); @@ -77,13 +77,13 @@ void SvPasswordHelper::GetHashPasswordLittleEndian(uno::Sequence<sal_Int8>& rPas void SvPasswordHelper::GetHashPasswordBigEndian(uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass) { sal_Int32 nSize(sPass.getLength()); - std::unique_ptr<sal_Char[]> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]); + std::unique_ptr<char[]> pCharBuffer(new char[nSize * sizeof(sal_Unicode)]); for (sal_Int32 i = 0; i < nSize; ++i) { sal_Unicode ch(sPass[ i ]); - pCharBuffer[2 * i] = static_cast< sal_Char >(ch >> 8); - pCharBuffer[2 * i + 1] = static_cast< sal_Char >(ch & 0xFF); + pCharBuffer[2 * i] = static_cast< char >(ch >> 8); + pCharBuffer[2 * i + 1] = static_cast< char >(ch & 0xFF); } GetHashPassword(rPassHash, pCharBuffer.get(), nSize * sizeof(sal_Unicode)); |