LibreOffice Module oox (master) 1
|
#include <Standard2007Engine.hxx>
Public Member Functions | |
Standard2007Engine ()=default | |
bool | readEncryptionInfo (css::uno::Reference< css::io::XInputStream > &rxInputStream) override |
virtual bool | generateEncryptionKey (OUString const &rPassword) override |
virtual bool | decrypt (BinaryXInputStream &aInputStream, BinaryXOutputStream &aOutputStream) override |
bool | checkDataIntegrity () override |
void | encrypt (const css::uno::Reference< css::io::XInputStream > &rxInputStream, css::uno::Reference< css::io::XOutputStream > &rxOutputStream, sal_uInt32 nSize) override |
virtual void | writeEncryptionInfo (BinaryXOutputStream &rStream) override |
virtual bool | setupEncryption (OUString const &rPassword) override |
Public Member Functions inherited from oox::crypto::CryptoEngine | |
CryptoEngine () | |
virtual | ~CryptoEngine () |
virtual bool | readEncryptionInfo (css::uno::Reference< css::io::XInputStream > &rxInputStream)=0 |
virtual bool | generateEncryptionKey (const OUString &rPassword)=0 |
virtual bool | decrypt (BinaryXInputStream &aInputStream, BinaryXOutputStream &aOutputStream)=0 |
virtual void | writeEncryptionInfo (BinaryXOutputStream &rStream)=0 |
virtual bool | setupEncryption (const OUString &rPassword)=0 |
virtual void | encrypt (const css::uno::Reference< css::io::XInputStream > &rxInputStream, css::uno::Reference< css::io::XOutputStream > &rxOutputStream, sal_uInt32 nSize)=0 |
virtual bool | checkDataIntegrity ()=0 |
Private Member Functions | |
bool | generateVerifier () |
bool | calculateEncryptionKey (std::u16string_view rPassword) |
Private Attributes | |
msfilter::StandardEncryptionInfo | mInfo |
Additional Inherited Members | |
Protected Attributes inherited from oox::crypto::CryptoEngine | |
std::vector< sal_uInt8 > | mKey |
Definition at line 27 of file Standard2007Engine.hxx.
|
default |
|
private |
Definition at line 70 of file Standard2007Engine.cxx.
References comphelper::Hash::calculateHash(), namespaces::i, mInfo, oox::crypto::CryptoEngine::mKey, p, msfilter::EncryptionVerifierAES::salt, msfilter::EncryptionVerifierAES::saltSize, comphelper::SHA1, comphelper::SHA1_HASH_LENGTH, msfilter::StandardEncryptionInfo::verifier, and oox::ByteOrderConverter::writeLittleEndian().
Referenced by generateEncryptionKey(), and setupEncryption().
|
overridevirtual |
Implements oox::crypto::CryptoEngine.
Definition at line 184 of file Standard2007Engine.cxx.
|
overridevirtual |
Implements oox::crypto::CryptoEngine.
Definition at line 160 of file Standard2007Engine.cxx.
References oox::crypto::Crypto::AES_128_ECB, oox::crypto::CryptoEngine::mKey, oox::BinaryXInputStream::readMemory(), oox::BinaryInputStream::readuInt32(), oox::BinaryXInputStream::skip(), oox::crypto::Decrypt::update(), and oox::BinaryXOutputStream::writeMemory().
|
overridevirtual |
Implements oox::crypto::CryptoEngine.
Definition at line 243 of file Standard2007Engine.cxx.
References oox::crypto::Crypto::AES_128_ECB, oox::crypto::CryptoEngine::mKey, oox::BinaryXInputStream::readMemory(), oox::crypto::roundUp(), U, oox::crypto::Encrypt::update(), oox::BinaryXOutputStream::writeMemory(), and oox::BinaryOutputStream::WriteUInt32().
|
overridevirtual |
Implements oox::crypto::CryptoEngine.
Definition at line 118 of file Standard2007Engine.cxx.
References oox::crypto::Decrypt::aes128ecb(), calculateEncryptionKey(), comphelper::Hash::calculateHash(), msfilter::ENCRYPTED_VERIFIER_LENGTH, msfilter::EncryptionVerifierAES::encryptedVerifier, msfilter::EncryptionVerifierAES::encryptedVerifierHash, msfilter::StandardEncryptionInfo::header, msfilter::EncryptionStandardHeader::keyBits, mInfo, oox::crypto::CryptoEngine::mKey, comphelper::SHA1, comphelper::SHA256_HASH_LENGTH, and msfilter::StandardEncryptionInfo::verifier.
|
private |
Definition at line 40 of file Standard2007Engine.cxx.
References oox::crypto::Crypto::AES_128_ECB, comphelper::Hash::calculateHash(), msfilter::ENCRYPTED_VERIFIER_LENGTH, msfilter::EncryptionVerifierAES::encryptedVerifier, msfilter::EncryptionVerifierAES::encryptedVerifierHash, msfilter::EncryptionVerifierAES::encryptedVerifierHashSize, mInfo, oox::crypto::CryptoEngine::mKey, comphelper::SHA1, comphelper::SHA1_HASH_LENGTH, comphelper::SHA256_HASH_LENGTH, oox::crypto::Encrypt::update(), and msfilter::StandardEncryptionInfo::verifier.
Referenced by setupEncryption().
|
overridevirtual |
Implements oox::crypto::CryptoEngine.
Definition at line 275 of file Standard2007Engine.cxx.
References msfilter::EncryptionStandardHeader::algId, msfilter::EncryptionStandardHeader::algIdHash, msfilter::ENCRYPT_ALGO_AES128, msfilter::ENCRYPT_HASH_SHA1, msfilter::EncryptionVerifierAES::encryptedVerifier, msfilter::EncryptionVerifierAES::encryptedVerifierHash, msfilter::EncryptionVerifierAES::encryptedVerifierHashSize, msfilter::ENCRYPTINFO_AES, msfilter::ENCRYPTINFO_CRYPTOAPI, msfilter::ENCRYPTINFO_EXTERNAL, msfilter::EncryptionStandardHeader::flags, oox::getFlag(), msfilter::StandardEncryptionInfo::header, oox::BinaryStreamBase::isEof(), msfilter::EncryptionStandardHeader::keyBits, mInfo, msfilter::EncryptionStandardHeader::providedType, oox::BinaryInputStream::readArray(), oox::BinaryInputStream::readuInt32(), msfilter::EncryptionStandardHeader::reserved1, msfilter::EncryptionStandardHeader::reserved2, SAL_N_ELEMENTS, msfilter::EncryptionVerifierAES::salt, msfilter::EncryptionVerifierAES::saltSize, msfilter::EncryptionStandardHeader::sizeExtra, oox::BinaryXInputStream::skip(), and msfilter::StandardEncryptionInfo::verifier.
|
overridevirtual |
Implements oox::crypto::CryptoEngine.
Definition at line 189 of file Standard2007Engine.cxx.
References msfilter::EncryptionStandardHeader::algId, msfilter::EncryptionStandardHeader::algIdHash, calculateEncryptionKey(), msfilter::ENCRYPT_ALGO_AES128, msfilter::ENCRYPT_HASH_SHA1, msfilter::ENCRYPT_KEY_SIZE_AES_128, msfilter::ENCRYPT_PROVIDER_TYPE_AES, msfilter::ENCRYPTINFO_AES, msfilter::ENCRYPTINFO_CRYPTOAPI, msfilter::EncryptionStandardHeader::flags, generateVerifier(), msfilter::StandardEncryptionInfo::header, msfilter::EncryptionStandardHeader::keyBits, mInfo, oox::crypto::CryptoEngine::mKey, msfilter::EncryptionStandardHeader::providedType, msfilter::EncryptionVerifierAES::salt, msfilter::EncryptionVerifierAES::saltSize, and msfilter::StandardEncryptionInfo::verifier.
|
overridevirtual |
Implements oox::crypto::CryptoEngine.
Definition at line 212 of file Standard2007Engine.cxx.
References msfilter::EncryptionStandardHeader::algId, msfilter::EncryptionStandardHeader::algIdHash, msfilter::EncryptionVerifierAES::encryptedVerifier, msfilter::EncryptionVerifierAES::encryptedVerifierHash, msfilter::EncryptionVerifierAES::encryptedVerifierHashSize, msfilter::EncryptionStandardHeader::flags, msfilter::StandardEncryptionInfo::header, msfilter::EncryptionStandardHeader::keyBits, mInfo, msfilter::EncryptionStandardHeader::providedType, msfilter::EncryptionStandardHeader::reserved1, msfilter::EncryptionStandardHeader::reserved2, msfilter::EncryptionVerifierAES::salt, msfilter::EncryptionVerifierAES::saltSize, msfilter::EncryptionStandardHeader::sizeExtra, msfilter::StandardEncryptionInfo::verifier, msfilter::VERSION_INFO_2007_FORMAT, oox::BinaryXOutputStream::writeMemory(), oox::BinaryOutputStream::WriteUInt16(), oox::BinaryOutputStream::WriteUInt32(), and oox::BinaryOutputStream::writeUnicodeArray().
|
private |
Definition at line 29 of file Standard2007Engine.hxx.
Referenced by calculateEncryptionKey(), generateEncryptionKey(), generateVerifier(), readEncryptionInfo(), setupEncryption(), and writeEncryptionInfo().