Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marek Kasik
poppler
Commits
8f79db34
Commit
8f79db34
authored
Aug 22, 2019
by
Marek Kasik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DecryptStream: Use Ref instead of two integers
Follow the changes introduced before also in this new code.
parent
b1502076
Pipeline
#58088
passed with stage
in 7 minutes and 29 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
poppler/DecryptStream.cc
poppler/DecryptStream.cc
+4
-4
poppler/DecryptStream.h
poppler/DecryptStream.h
+2
-2
poppler/DecryptStreamNSS.cc
poppler/DecryptStreamNSS.cc
+4
-4
poppler/DecryptStreamNSS.h
poppler/DecryptStreamNSS.h
+2
-2
No files found.
poppler/DecryptStream.cc
View file @
8f79db34
...
...
@@ -130,8 +130,8 @@ void aesEncryptArray(const unsigned char *IV,
//------------------------------------------------------------------------
EncryptStream
::
EncryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
objNum
,
objGen
)
int
keyLength
,
Ref
refA
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
refA
)
{
// Fill the CBC initialization vector for AES and AES-256
switch
(
algo
)
{
...
...
@@ -222,8 +222,8 @@ int EncryptStream::lookChar() {
//------------------------------------------------------------------------
DecryptStream
::
DecryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
objNum
,
objGen
)
int
keyLength
,
Ref
refA
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
refA
)
{
}
...
...
poppler/DecryptStream.h
View file @
8f79db34
...
...
@@ -101,7 +101,7 @@ class EncryptStream : public BaseCryptStream {
public:
EncryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
);
int
keyLength
,
Ref
ref
);
~
EncryptStream
();
void
reset
()
override
;
int
lookChar
()
override
;
...
...
@@ -119,7 +119,7 @@ class DecryptStream : public BaseCryptStream {
public:
DecryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
);
int
keyLength
,
Ref
ref
);
~
DecryptStream
();
void
reset
()
override
;
int
lookChar
()
override
;
...
...
poppler/DecryptStreamNSS.cc
View file @
8f79db34
...
...
@@ -107,8 +107,8 @@ void aesEncryptArray(const unsigned char *IV,
//------------------------------------------------------------------------
EncryptStream
::
EncryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
objNum
,
objGen
)
int
keyLength
,
Ref
refA
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
refA
)
{
// Fill the CBC initialization vector for AES and AES-256
if
(
algo
==
cryptAES
||
algo
==
cryptAES256
)
...
...
@@ -207,8 +207,8 @@ int EncryptStream::lookChar() {
//------------------------------------------------------------------------
DecryptStream
::
DecryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
objNum
,
objGen
)
int
keyLength
,
Ref
refA
)
:
BaseCryptStream
(
strA
,
fileKey
,
algoA
,
keyLength
,
refA
)
{
switch
(
algo
)
{
case
cryptRC4
:
...
...
poppler/DecryptStreamNSS.h
View file @
8f79db34
...
...
@@ -95,7 +95,7 @@ class EncryptStream : public BaseCryptStream {
public:
EncryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
);
int
keyLength
,
Ref
ref
);
~
EncryptStream
();
void
reset
()
override
;
int
lookChar
()
override
;
...
...
@@ -112,7 +112,7 @@ class DecryptStream : public BaseCryptStream {
public:
DecryptStream
(
Stream
*
strA
,
const
unsigned
char
*
fileKey
,
CryptAlgorithm
algoA
,
int
keyLength
,
int
objNum
,
int
objGen
);
int
keyLength
,
Ref
ref
);
~
DecryptStream
();
void
reset
()
override
;
int
lookChar
()
override
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment