Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_encryptor.cpp
Go to the documentation of this file.
1
// Copyright 2017 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
include
"core/fpdfapi/parser/cpdf_encryptor.h"
8
9
#
include
<
stdint
.
h
>
10
11
#
include
"core/fpdfapi/parser/cpdf_crypto_handler.h"
12
#
include
"core/fxcrt/check.h"
13
#
include
"core/fxcrt/data_vector.h"
14
15
CPDF_Encryptor
::
CPDF_Encryptor
(
const
CPDF_CryptoHandler
* pHandler,
int
objnum)
16
:
m_pHandler
(
pHandler
), m_ObjNum(objnum) {
17
DCHECK
(m_pHandler);
18
}
19
20
DataVector
<
uint8_t
>
CPDF_Encryptor
::
Encrypt
(
21
pdfium::span<
const
uint8_t> src_data)
const
{
22
if
(src_data.empty()) {
23
return
DataVector<uint8_t>();
24
}
25
return
m_pHandler->EncryptContent(m_ObjNum, 0, src_data);
26
}
27
28
CPDF_Encryptor
::~
CPDF_Encryptor
() =
default
;
DCHECK
#define DCHECK
Definition
check.h:33
CPDF_CryptoHandler
Definition
cpdf_crypto_handler.h:27
CPDF_Encryptor
Definition
cpdf_encryptor.h:18
CPDF_Encryptor::~CPDF_Encryptor
~CPDF_Encryptor()
CPDF_Encryptor::CPDF_Encryptor
CPDF_Encryptor(const CPDF_CryptoHandler *pHandler, int objnum)
Definition
cpdf_encryptor.cpp:15
CPDF_Encryptor::Encrypt
DataVector< uint8_t > Encrypt(pdfium::span< const uint8_t > src_data) const
Definition
cpdf_encryptor.cpp:20
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
parser
cpdf_encryptor.cpp
Generated on
for Qt by
1.14.0