X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FDecrypt.h;fp=pdf2swf%2Fxpdf%2FDecrypt.h;h=0000000000000000000000000000000000000000;hp=2beba581583e6dca87e1d34ce40cc9ff85896700;hb=5a005ef586b9000810156a961b9622c903dce988;hpb=c26ca847941ca0acfc9f3b4bdc519d904ba09a39 diff --git a/pdf2swf/xpdf/Decrypt.h b/pdf2swf/xpdf/Decrypt.h deleted file mode 100644 index 2beba58..0000000 --- a/pdf2swf/xpdf/Decrypt.h +++ /dev/null @@ -1,63 +0,0 @@ -//======================================================================== -// -// Decrypt.h -// -// Copyright 1996-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef DECRYPT_H -#define DECRYPT_H - -#include - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "gtypes.h" -#include "GString.h" - -//------------------------------------------------------------------------ -// Decrypt -//------------------------------------------------------------------------ - -class Decrypt { -public: - - // Initialize the decryptor object. - Decrypt(Guchar *fileKey, int keyLength, int objNum, int objGen); - - // Reset decryption. - void reset(); - - // Decrypt one byte. - Guchar decryptByte(Guchar c); - - // Generate a file key. The buffer must have space for at - // least 16 bytes. Checks and then - // and returns true if either is correct. Sets if - // the owner password was correct. Either or both of the passwords - // may be NULL, which is treated as an empty string. - static GBool makeFileKey(int encVersion, int encRevision, int keyLength, - GString *ownerKey, GString *userKey, - int permissions, GString *fileID, - GString *ownerPassword, GString *userPassword, - Guchar *fileKey, GBool encryptMetadata, - GBool *ownerPasswordOk); - -private: - - static GBool makeFileKey2(int encVersion, int encRevision, int keyLength, - GString *ownerKey, GString *userKey, - int permissions, GString *fileID, - GString *userPassword, Guchar *fileKey, - GBool encryptMetadata); - - int objKeyLength; - Guchar objKey[21]; - Guchar state[256]; - Guchar x, y; -}; - -#endif