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
49188435
Kaydet (Commit)
49188435
authored
Eki 20, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
hash len is 20 for xls cryptoapi configuration
Change-Id: I6e06b8578959b8147043179db57e875b1d98d57d
üst
fcf7f503
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
Standard2007Engine.hxx
include/oox/crypto/Standard2007Engine.hxx
+3
-2
Standard2007Engine.cxx
oox/source/crypto/Standard2007Engine.cxx
+4
-4
No files found.
include/oox/crypto/Standard2007Engine.hxx
Dosyayı görüntüle @
49188435
...
...
@@ -52,7 +52,8 @@ const sal_uInt32 VERSION_INFO_AGILE = 0x00040004;
const
sal_uInt32
SALT_LENGTH
=
16
;
const
sal_uInt32
ENCRYPTED_VERIFIER_LENGTH
=
16
;
const
sal_uInt32
ENCRYPTED_VERIFIER_HASH_LENGTH
=
32
;
const
sal_uInt32
ENCRYPTED_RC4_VERIFIER_HASH_LENGTH
=
20
;
const
sal_uInt32
ENCRYPTED_AES_VERIFIER_HASH_LENGTH
=
32
;
struct
EncryptionStandardHeader
{
...
...
@@ -74,7 +75,7 @@ struct EncryptionVerifierAES
sal_uInt8
salt
[
SALT_LENGTH
];
// random generated salt value
sal_uInt8
encryptedVerifier
[
ENCRYPTED_VERIFIER_LENGTH
];
// randomly generated verifier value
sal_uInt32
encryptedVerifierHashSize
;
// actually written hash size - depends on algorithm
sal_uInt8
encryptedVerifierHash
[
ENCRYPTED_VERIFIER_HASH_LENGTH
];
// verifier value hash - itself also encrypted
sal_uInt8
encryptedVerifierHash
[
ENCRYPTED_
AES_
VERIFIER_HASH_LENGTH
];
// verifier value hash - itself also encrypted
EncryptionVerifierAES
();
};
...
...
oox/source/crypto/Standard2007Engine.cxx
Dosyayı görüntüle @
49188435
...
...
@@ -90,9 +90,9 @@ bool Standard2007Engine::generateVerifier()
vector
<
sal_uInt8
>
hash
(
RTL_DIGEST_LENGTH_SHA1
,
0
);
mInfo
.
verifier
.
encryptedVerifierHashSize
=
RTL_DIGEST_LENGTH_SHA1
;
Digest
::
sha1
(
hash
,
verifier
);
hash
.
resize
(
ENCRYPTED_VERIFIER_HASH_LENGTH
,
0
);
hash
.
resize
(
ENCRYPTED_
AES_
VERIFIER_HASH_LENGTH
,
0
);
vector
<
sal_uInt8
>
encryptedHash
(
ENCRYPTED_VERIFIER_HASH_LENGTH
,
0
);
vector
<
sal_uInt8
>
encryptedHash
(
ENCRYPTED_
AES_
VERIFIER_HASH_LENGTH
,
0
);
Encrypt
aEncryptorHash
(
mKey
,
iv
,
Crypto
::
AES_128_ECB
);
aEncryptorHash
.
update
(
encryptedHash
,
hash
,
hash
.
size
());
...
...
@@ -162,10 +162,10 @@ bool Standard2007Engine::generateEncryptionKey(const OUString& password)
mInfo
.
verifier
.
encryptedVerifier
+
ENCRYPTED_VERIFIER_LENGTH
,
encryptedVerifier
.
begin
());
vector
<
sal_uInt8
>
encryptedHash
(
ENCRYPTED_VERIFIER_HASH_LENGTH
);
vector
<
sal_uInt8
>
encryptedHash
(
ENCRYPTED_
AES_
VERIFIER_HASH_LENGTH
);
std
::
copy
(
mInfo
.
verifier
.
encryptedVerifierHash
,
mInfo
.
verifier
.
encryptedVerifierHash
+
ENCRYPTED_VERIFIER_HASH_LENGTH
,
mInfo
.
verifier
.
encryptedVerifierHash
+
ENCRYPTED_
AES_
VERIFIER_HASH_LENGTH
,
encryptedHash
.
begin
());
vector
<
sal_uInt8
>
verifier
(
encryptedVerifier
.
size
(),
0
);
...
...
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