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
f8371ae1
Kaydet (Commit)
f8371ae1
authored
Eki 08, 2015
tarafından
Rosemary
Kaydeden (comit)
Markus Mohrhard
Eki 08, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Generate random numbers for seed
Change-Id: I7527b0526a74c4d13036d58d904f2b7293c3463f
üst
eeba0f6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
vbaexport.cxx
oox/source/ole/vbaexport.cxx
+8
-2
No files found.
oox/source/ole/vbaexport.cxx
Dosyayı görüntüle @
f8371ae1
...
...
@@ -370,7 +370,13 @@ VBAEncryption::VBAEncryption(const sal_uInt8* pData, const sal_uInt16 length, Sv
,
mnVersionEnc
(
0
)
{
if
(
!
pSeed
)
mnSeed
=
0xBE
;
// sample seed value TODO:Generate random seed values
{
// mnSeed = 0xBE;
std
::
random_device
rd
;
std
::
mt19937
gen
(
rd
());
std
::
uniform_int_distribution
<>
dis
(
0
,
255
);
mnSeed
=
dis
(
gen
);
}
}
void
VBAEncryption
::
writeSeed
()
...
...
@@ -412,7 +418,7 @@ void VBAEncryption::writeIgnoredEnc()
mnIgnoredLength
=
(
mnSeed
&
6
)
/
2
;
for
(
sal_Int32
i
=
1
;
i
<=
mnIgnoredLength
;
++
i
)
{
sal_uInt8
nTempValue
=
0xBE
;
//
TODO:Generate a random valu
e
sal_uInt8
nTempValue
=
0xBE
;
//
Any value can be assigned her
e
sal_uInt8
nByteEnc
=
nTempValue
^
(
mnEncryptedByte2
+
mnUnencryptedByte1
);
exportHexString
(
mrEncryptedData
,
nByteEnc
);
mnEncryptedByte2
=
mnEncryptedByte1
;
...
...
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