2
//========================================================================
6
// Copyright 1996-2002 Glyph & Cog, LLC
8
//========================================================================
15
#ifdef USE_GCC_PRAGMAS
22
//------------------------------------------------------------------------
24
//------------------------------------------------------------------------
29
// Initialize the decryptor object.
30
Decrypt(Guchar *fileKey, int keyLength, int objNum, int objGen);
36
Guchar decryptByte(Guchar c);
38
// Generate a file key. The <fileKey> buffer must have space for at
39
// least 16 bytes. Checks <ownerPassword> and then <userPassword>
40
// and returns true if either is correct. Sets <ownerPasswordOk> if
41
// the owner password was correct. Either or both of the passwords
42
// may be NULL, which is treated as an empty string.
43
static GBool makeFileKey(int encVersion, int encRevision, int keyLength,
44
GString *ownerKey, GString *userKey,
45
int permissions, GString *fileID,
46
GString *ownerPassword, GString *userPassword,
47
Guchar *fileKey, GBool *ownerPasswordOk);
51
static GBool makeFileKey2(int encVersion, int encRevision, int keyLength,
52
GString *ownerKey, GString *userKey,
53
int permissions, GString *fileID,
54
GString *userPassword, Guchar *fileKey);