Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d841f348
Kaydet (Commit)
d841f348
authored
Şub 24, 2018
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add ScOoxPasswordHash::verifyPassword(), tdf#104250 prep
Change-Id: Ife588fa0626b01336813e956a25e51541d1096e6
üst
5f4df7af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
tabprotection.hxx
sc/inc/tabprotection.hxx
+1
-0
tabprotection.cxx
sc/source/core/data/tabprotection.cxx
+14
-0
No files found.
sc/inc/tabprotection.hxx
Dosyayı görüntüle @
d841f348
...
...
@@ -55,6 +55,7 @@ struct ScOoxPasswordHash
maHashValue
.
clear
();
maSaltValue
.
clear
();
}
bool
verifyPassword
(
const
OUString
&
aPassText
)
const
;
};
namespace
ScPassHashHelper
...
...
sc/source/core/data/tabprotection.cxx
Dosyayı görüntüle @
d841f348
...
...
@@ -20,6 +20,7 @@
#include <tabprotection.hxx>
#include <svl/PasswordHelper.hxx>
#include <comphelper/docpasswordhelper.hxx>
#include <comphelper/hash.hxx>
#include <osl/diagnose.h>
#include <document.hxx>
...
...
@@ -88,6 +89,19 @@ ScPasswordHash ScPassHashHelper::getHashTypeFromURI(const OUString& rURI)
return
PASSHASH_UNSPECIFIED
;
}
bool
ScOoxPasswordHash
::
verifyPassword
(
const
OUString
&
aPassText
)
const
{
if
(
!
hasPassword
())
return
false
;
const
OUString
aHash
(
comphelper
::
Hash
::
calculateHashBase64
(
aPassText
,
maSaltValue
,
mnSpinCount
,
maAlgorithmName
));
if
(
aHash
.
isEmpty
())
// unsupported algorithm
return
false
;
return
aHash
==
maHashValue
;
}
ScPassHashProtectable
::~
ScPassHashProtectable
()
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment