/src/libreoffice/vcl/source/pdf/PDFEncryptionInitialization.cxx
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | * |
9 | | */ |
10 | | |
11 | | #include <vcl/pdf/PDFEncryptionInitialization.hxx> |
12 | | #include <pdf/EncryptionHashTransporter.hxx> |
13 | | #include <com/sun/star/beans/XMaterialHolder.hpp> |
14 | | #include <rtl/ref.hxx> |
15 | | #include <pdf/PDFEncryptor.hxx> |
16 | | #include <pdf/PDFEncryptorR6.hxx> |
17 | | |
18 | | using namespace css; |
19 | | |
20 | | namespace vcl::pdf |
21 | | { |
22 | | css::uno::Reference<css::beans::XMaterialHolder> initEncryption(const OUString& i_rOwnerPassword, |
23 | | const OUString& i_rUserPassword) |
24 | 0 | { |
25 | 0 | rtl::Reference<EncryptionHashTransporter> pTransporter = new EncryptionHashTransporter; |
26 | 0 | PDFEncryptor::initEncryption(*pTransporter, i_rOwnerPassword, i_rUserPassword); |
27 | 0 | PDFEncryptorR6::initEncryption(*pTransporter, i_rOwnerPassword, i_rUserPassword); |
28 | 0 | return pTransporter; |
29 | 0 | } |
30 | | |
31 | | } // end vcl::pdf |
32 | | |
33 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |