diff options
Diffstat (limited to 'include/oox/crypto/AgileEngine.hxx')
-rw-r--r-- | include/oox/crypto/AgileEngine.hxx | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx index 7a3f4788d1af..2fed653d924e 100644 --- a/include/oox/crypto/AgileEngine.hxx +++ b/include/oox/crypto/AgileEngine.hxx @@ -96,31 +96,44 @@ private: static Crypto::CryptoType cryptoType(const AgileEncryptionInfo& rInfo); -public: - AgileEngine(); + // Decryption - AgileEncryptionInfo& getInfo() { return mInfo;} + bool decryptHmacKey(); + bool decryptHmacValue(); + + AgileEncryptionInfo& getInfo() { return mInfo; } void setPreset(AgileEncryptionPreset ePreset) { meEncryptionPreset = ePreset; } - // Decryption - void decryptEncryptionKey(OUString const & rPassword); bool decryptAndCheckVerifierHash(OUString const & rPassword); + // Encryption + + bool encryptHmacKey(); + bool encryptHmacValue(); + + bool generateAndEncryptVerifierHash(OUString const & rPassword); + + bool encryptEncryptionKey(OUString const & rPassword); + void setupEncryptionParameters(AgileEncryptionParameters const & rAgileEncryptionParameters); + bool setupEncryptionKey(OUString const & rPassword); + +public: + AgileEngine(); + + // Decryption + bool generateEncryptionKey(OUString const & rPassword) override; - bool readEncryptionInfo(css::uno::Reference<css::io::XInputStream> & rxInputStream) override; + bool readEncryptionInfo(oox::ole::OleStorage& rOleStorage) override; bool decrypt(BinaryXInputStream& aInputStream, BinaryXOutputStream& aOutputStream) override; bool checkDataIntegrity() override; - bool decryptHmacKey(); - bool decryptHmacValue(); - // Encryption void writeEncryptionInfo(oox::ole::OleStorage& rOleStorage) override; @@ -132,15 +145,6 @@ public: bool setupEncryption(css::uno::Sequence<css::beans::NamedValue>& rMediaEncData) override; virtual void createEncryptionData(comphelper::SequenceAsHashMap & aEncryptionData, const OUString rPassword) override; - - bool generateAndEncryptVerifierHash(OUString const & rPassword); - - bool encryptHmacKey(); - bool encryptHmacValue(); - - bool encryptEncryptionKey(OUString const & rPassword); - void setupEncryptionParameters(AgileEncryptionParameters const & rAgileEncryptionParameters); - bool setupEncryptionKey(OUString const & rPassword); }; } // namespace core |