Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / oox / crypto / CryptoEngine.hxx
blob9b988c0b2f25a9acb3cd2b79b2ae6e7e233acc06
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 namespace oox {
20 class BinaryXInputStream;
21 class BinaryXOutputStream;
24 namespace oox {
25 namespace core {
27 class CryptoEngine
29 protected:
30 std::vector<sal_uInt8> mKey;
32 public:
33 CryptoEngine()
36 virtual ~CryptoEngine()
39 virtual void writeEncryptionInfo(
40 const OUString& rPassword,
41 BinaryXOutputStream& rStream) = 0;
43 virtual bool generateEncryptionKey(const OUString& rPassword) = 0;
45 virtual bool decrypt(
46 BinaryXInputStream& aInputStream,
47 BinaryXOutputStream& aOutputStream) = 0;
49 virtual void encrypt(
50 BinaryXInputStream& aInputStream,
51 BinaryXOutputStream& aOutputStream) = 0;
54 } // namespace core
55 } // namespace oox
57 #endif
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */