⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pgpsdacreate.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
	Copyright (C) 2002 PGP Corporation
	All rights reserved.

	$Id: pgpSDACreate.h,v 1.12 2002/08/06 20:10:16 dallen Exp $
____________________________________________________________________________*/
#ifndef Included_pgpSDACreate_h	/* [ */
#define Included_pgpSDACreate_h

// System headers
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>

// PGPlib headers
#include "pgpVersionHeader.h"
#include "pgpBuild.h"
#include "pgpKeys.h"
#include "pgpConfig.h"
#include "pgpErrors.h"
#include "pgpEncode.h"
#include "pgpUtilities.h"
#include "pflPrefTypes.h"
#include "pgpPubTypes.h"
#include "pgpCFB.h"

// Other headers
#include "DeflateWrapper.h"

#ifdef IS_SEA
#include "pgpSEA.h"
#else
#include "pgpSDA.h"
#endif // IS_SEA

#ifndef NOCOMPRESSION_SDA
#define NOCOMPRESSION_SDA 0
#endif

#ifndef NOCOMPRESSION_SEA
#define NOCOMPRESSION_SEA 0
#endif

// Filelist structure that may already be defined in PGPsc
#ifndef _PGPSCH
typedef struct _FILELIST
{
	char *name;
	PGPBoolean IsDirectory;
	struct _FILELIST *next;
} FILELIST;
#endif

typedef struct SDAEventErrorData_
{
	char *fileName;
	PGPError err;
} SDAEventErrorData;

typedef struct SDAEventProgressData_
{
#ifdef NO_64INT
	PGPUInt32 bytesWritten;
	PGPUInt32 bytesTotal;
#else /* NO_64INT */
	PGPUInt64 bytesWritten;
	PGPUInt64 bytesTotal;
#endif /* NO_64INT */
} SDAEventProgressData;

typedef struct SDAEventNewFileData_
{
	char *fileName;
} SDAEventNewFileData;

typedef struct SDAEventAskFileData_
{
	char *inName;
	char *outName;
} SDAEventAskFileData;

typedef struct SDAEventGetSDARandomBitsData_
{
	PGPUInt32 EntropyAmount;
} SDAEventGetSDARandomBitsData;

typedef struct SDAEventWriteSDAStubData_
{
	FILE *fOutput;
} SDAEventWriteSDAStubData;

#ifdef E_BUSINESS_SERVER
typedef struct SDAEventPreserveDirectoryData_
{
	PGPBoolean	bPreserveDirectories;
} SDAEventPreserveDirectoryData;

typedef struct SDAEventEncryptADKData_
{
	PGPByte		encryptedBlock[1024];	/* hashedPassphrase encrypted to ADK Key */
	PGPSize		blockSize;
	PGPByte		hashedPassphrase[20];	/* SHA is 160 bits (20 * 8) */
	PGPBoolean	bEncryptToADK;
} SDAEventEncryptADKData;

typedef struct SDAEventAutoLaunchData_
{
	PGPUInt32	autoExecNum;
} SDAEventAutoLaunchData;
#endif /* E_BUSINESS_SERVER */

/* Union of all event data structures above */
typedef union SDAEventData_
{
	SDAEventProgressData			progressData;
	SDAEventNewFileData				newfileData;
	SDAEventGetSDARandomBitsData	randomData;
	SDAEventWriteSDAStubData		stubData;
	SDAEventAskFileData				askfileData;
	SDAEventErrorData				errorData;
#ifdef E_BUSINESS_SERVER
	SDAEventPreserveDirectoryData	directoryData;
	SDAEventEncryptADKData			adkencryptData;
	SDAEventAutoLaunchData			autolaunchData;
#endif /* E_BUSINESS_SERVER */
} SDAEventData;

/* SDAEvent structure */
typedef enum SDAEventType_
{
	kSDAEvent_ProgressEvent				=  0,		/* Nothing happened */
	kSDAEvent_NewFileEvent				=  1,		/* Final event */
	kSDAEvent_GetSDARandomBitsEvent		=  2,		/* Final event */
	kSDAEvent_WriteSDAStubEvent			=  3,		/* Final event */
	kSDAEvent_AskFileEvent				=  4,
	kSDAEvent_ErrorEvent				=  5,
#ifdef E_BUSINESS_SERVER
	kSDAEvent_PreserveDirectoriesEvent	= 6,
	kSDAEvent_EncryptADKEvent			= 7,
	kSDAEvent_AutoLaunchEvent			= 8
#endif /* E_BUSINESS_SERVER */
} SDAEventType;

typedef struct SDAEvent_
{
	SDAEventType			 type;			/* Type of event */
	SDAEventData			 data;			/* Event specific data */
} SDAEvent;

//                             b b b b b b b b = 8 bytes
#ifdef NO_64INT
#define PGPSDA_SIZEDIRECTORY 0xFFFFFFFF
#else /* !NO_64INT */
#define PGPSDA_SIZEDIRECTORY 0xFFFFFFFFFFFFFFFF
#endif /* NO_64INT */


typedef PGPError (*SDACREATECALLBACK)(PGPContextRef context,SDAEvent *event,void *pUserValue);

PGPError SDACreate(PGPContextRef context,FILELIST *fl,
						char *szOutputFileName,char *ConvPassPhrase,
						SDACREATECALLBACK UserProc,void *pUserValue,
						PGPUInt32 Flags);

#endif /* ] Included_pgpSDACreate_h */


/*__Editor_settings____

	Local Variables:
	tab-width: 4
	End:
	vi: ts=4 sw=4
	vim: si
_____________________*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -