tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / include / oox / crypto / Standard2007Engine.hxx
blob17ebbccd2556bd63e4766cba1e5f2a9ea7a8d469
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
11 #ifndef INCLUDED_OOX_CRYPTO_STANDARD2007ENGINE_HXX
12 #define INCLUDED_OOX_CRYPTO_STANDARD2007ENGINE_HXX
14 #include <oox/dllapi.h>
15 #include <oox/crypto/CryptoEngine.hxx>
16 #include <filter/msfilter/mscodec.hxx>
17 #include <rtl/ustring.hxx>
18 #include <sal/types.h>
20 namespace oox {
21 class BinaryXInputStream;
22 class BinaryXOutputStream;
25 namespace oox::crypto {
27 class OOX_DLLPUBLIC Standard2007Engine final : public CryptoEngine
29 msfilter::StandardEncryptionInfo mInfo;
31 bool generateVerifier();
32 bool calculateEncryptionKey(std::u16string_view rPassword);
34 public:
35 Standard2007Engine() = default;
37 bool readEncryptionInfo(css::uno::Reference<css::io::XInputStream> & rxInputStream) override;
39 virtual bool generateEncryptionKey(OUString const & rPassword) override;
41 virtual bool decrypt(
42 BinaryXInputStream& aInputStream,
43 BinaryXOutputStream& aOutputStream) override;
45 bool checkDataIntegrity() override;
47 void encrypt(const css::uno::Reference<css::io::XInputStream>& rxInputStream,
48 css::uno::Reference<css::io::XOutputStream>& rxOutputStream,
49 sal_uInt32 nSize) override;
51 virtual void writeEncryptionInfo(BinaryXOutputStream& rStream) override;
53 virtual bool setupEncryption(OUString const & rPassword) override;
57 } // namespace oox::crypto
59 #endif
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */