mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
fix potential 64-bit issues
git-svn-id: svn+q:///qpdf/trunk@613 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
c7477e205e
commit
62bff4861f
@ -85,7 +85,7 @@ class QPDF
|
||||
struct EncryptionData
|
||||
{
|
||||
// This class holds data read from the encryption dictionary.
|
||||
EncryptionData(int V, int R, int Length_bytes, long P,
|
||||
EncryptionData(int V, int R, int Length_bytes, int P,
|
||||
std::string const& O, std::string const& U,
|
||||
std::string const& id1) :
|
||||
V(V),
|
||||
@ -101,7 +101,7 @@ class QPDF
|
||||
int V;
|
||||
int R;
|
||||
int Length_bytes;
|
||||
long P;
|
||||
int P;
|
||||
std::string O;
|
||||
std::string U;
|
||||
std::string id1;
|
||||
@ -115,7 +115,7 @@ class QPDF
|
||||
|
||||
static void compute_encryption_O_U(
|
||||
char const* user_password, char const* owner_password,
|
||||
int V, int R, int key_len, unsigned long P,
|
||||
int V, int R, int key_len, int P,
|
||||
std::string const& id1,
|
||||
std::string& O, std::string& U);
|
||||
std::string const& getUserPassword() const;
|
||||
|
@ -230,7 +230,7 @@ QPDFWriter::setEncryptionParameters(
|
||||
bits_to_clear.insert(1);
|
||||
bits_to_clear.insert(2);
|
||||
|
||||
unsigned long P = 0;
|
||||
int P = 0;
|
||||
// Create the complement of P, then invert.
|
||||
for (std::set<int>::iterator iter = bits_to_clear.begin();
|
||||
iter != bits_to_clear.end(); ++iter)
|
||||
|
@ -427,7 +427,7 @@ QPDF::decryptStream(Pipeline*& pipeline, int objid, int generation,
|
||||
void
|
||||
QPDF::compute_encryption_O_U(
|
||||
char const* user_password, char const* owner_password,
|
||||
int V, int R, int key_len, unsigned long P,
|
||||
int V, int R, int key_len, int P,
|
||||
std::string const& id1, std::string& O, std::string& U)
|
||||
{
|
||||
EncryptionData data(V, R, key_len, P, "", "", id1);
|
||||
|
Loading…
Reference in New Issue
Block a user