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
fx_crypt.h
Go to the documentation of this file.
1// Copyright 2014 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#ifndef CORE_FDRM_FX_CRYPT_H_
8#define CORE_FDRM_FX_CRYPT_H_
9
10#include <stdint.h>
11#include <array>
12
13#include "core/fdrm/fx_crypt_aes.h"
14#include "core/fdrm/fx_crypt_sha.h"
15#include "core/fxcrt/span.h"
16
18 static constexpr int32_t kPermutationLength = 256;
19
20 int32_t x;
21 int32_t y;
22 std::array<int32_t, kPermutationLength> m;
23};
24
26 std::array<uint32_t, 2> total;
27 std::array<uint32_t, 4> state;
28 uint8_t buffer[64];
29};
30
31void CRYPT_ArcFourCryptBlock(pdfium::span<uint8_t> data,
32 pdfium::span<const uint8_t> key);
34 pdfium::span<const uint8_t> key);
35void CRYPT_ArcFourCrypt(CRYPT_rc4_context* context, pdfium::span<uint8_t> data);
36
39 pdfium::span<const uint8_t> data);
41 pdfium::span<uint8_t, 16> digest);
42void CRYPT_MD5Generate(pdfium::span<const uint8_t> data,
43 pdfium::span<uint8_t, 16> digest);
44
45#endif // CORE_FDRM_FX_CRYPT_H_
void CRYPT_MD5Finish(CRYPT_md5_context *context, pdfium::span< uint8_t, 16 > digest)
Definition fx_crypt.cpp:203
#define P(a, b, c, d, k, s, t)
void CRYPT_MD5Generate(pdfium::span< const uint8_t > data, pdfium::span< uint8_t, 16 > digest)
Definition fx_crypt.cpp:219
#define S(x, n)
void CRYPT_ArcFourCryptBlock(pdfium::span< uint8_t > data, pdfium::span< const uint8_t > key)
Definition fx_crypt.cpp:157
void CRYPT_ArcFourSetup(CRYPT_rc4_context *context, pdfium::span< const uint8_t > key)
Definition fx_crypt.cpp:131
void CRYPT_MD5Update(CRYPT_md5_context *context, pdfium::span< const uint8_t > data)
Definition fx_crypt.cpp:175
void CRYPT_ArcFourCrypt(CRYPT_rc4_context *context, pdfium::span< uint8_t > data)
Definition fx_crypt.cpp:146
CRYPT_md5_context CRYPT_MD5Start()
Definition fx_crypt.cpp:164
uint8_t buffer[64]
Definition fx_crypt.h:28
std::array< uint32_t, 4 > state
Definition fx_crypt.h:27
std::array< uint32_t, 2 > total
Definition fx_crypt.h:26
std::array< int32_t, kPermutationLength > m
Definition fx_crypt.h:22
static constexpr int32_t kPermutationLength
Definition fx_crypt.h:18