bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / oox / crypto / Standard2007Engine.hxx
blob68871d2e1ab8bdf75a406aa7c89b77db04dcfc90
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/digest.h>
18 #include <rtl/ustring.hxx>
19 #include <sal/types.h>
21 namespace oox {
22 class BinaryXInputStream;
23 class BinaryXOutputStream;
26 namespace oox {
27 namespace core {
29 class OOX_DLLPUBLIC Standard2007Engine : public CryptoEngine
31 msfilter::StandardEncryptionInfo mInfo;
33 bool generateVerifier();
34 bool calculateEncryptionKey(const OUString& rPassword);
36 public:
37 Standard2007Engine() = default;
39 bool readEncryptionInfo(css::uno::Reference<css::io::XInputStream> & rxInputStream) override;
41 virtual bool generateEncryptionKey(OUString const & rPassword) override;
43 virtual bool decrypt(
44 BinaryXInputStream& aInputStream,
45 BinaryXOutputStream& aOutputStream) override;
47 bool checkDataIntegrity() override;
49 void encrypt(css::uno::Reference<css::io::XInputStream>& rxInputStream,
50 css::uno::Reference<css::io::XOutputStream>& rxOutputStream,
51 sal_uInt32 nSize) override;
53 virtual void writeEncryptionInfo(BinaryXOutputStream& rStream) override;
55 virtual bool setupEncryption(OUString const & rPassword) override;
59 } // namespace core
60 } // namespace oox
62 #endif
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */