bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / oox / crypto / CryptoEngine.hxx
blob8a947f10d106221a06323c6e1be3b1dcafd16c77
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_CRYPTOENGINE_HXX
12 #define INCLUDED_OOX_CRYPTO_CRYPTOENGINE_HXX
14 #include <vector>
16 #include <rtl/ustring.hxx>
17 #include <sal/types.h>
19 #include <com/sun/star/io/XInputStream.hpp>
20 #include <com/sun/star/io/XOutputStream.hpp>
22 namespace oox {
23 class BinaryXInputStream;
24 class BinaryXOutputStream;
27 namespace oox {
28 namespace core {
30 class CryptoEngine
32 protected:
33 std::vector<sal_uInt8> mKey;
35 public:
36 CryptoEngine()
39 virtual ~CryptoEngine()
42 // Decryption
43 virtual bool readEncryptionInfo(css::uno::Reference<css::io::XInputStream> & rxInputStream) = 0;
45 virtual bool generateEncryptionKey(const OUString& rPassword) = 0;
47 virtual bool decrypt(
48 BinaryXInputStream& aInputStream,
49 BinaryXOutputStream& aOutputStream) = 0;
51 // Encryption
52 virtual void writeEncryptionInfo(BinaryXOutputStream & rStream) = 0;
54 virtual bool setupEncryption(const OUString& rPassword) = 0;
56 virtual void encrypt(css::uno::Reference<css::io::XInputStream> & rxInputStream,
57 css::uno::Reference<css::io::XOutputStream> & rxOutputStream,
58 sal_uInt32 nSize) = 0;
60 virtual bool checkDataIntegrity() = 0;
63 } // namespace core
64 } // namespace oox
66 #endif
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */