summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src/PGPw/sdk6/include/pgpEncode.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-07-20 16:21:49 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-07-20 16:21:49 +0000
commitf424a18112032cf61d2871a6b91a5af607c171ae (patch)
tree88fedc4e28941ceecda7026f0b06eba6271f91d5 /plugins/CryptoPP/src/PGPw/sdk6/include/pgpEncode.h
parentbfe1bd0fc087be44c70904aee0fe4276643d206d (diff)
CryptoPP:
changed folder structure git-svn-id: http://svn.miranda-ng.org/main/trunk@1083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/src/PGPw/sdk6/include/pgpEncode.h')
-rw-r--r--plugins/CryptoPP/src/PGPw/sdk6/include/pgpEncode.h301
1 files changed, 301 insertions, 0 deletions
diff --git a/plugins/CryptoPP/src/PGPw/sdk6/include/pgpEncode.h b/plugins/CryptoPP/src/PGPw/sdk6/include/pgpEncode.h
new file mode 100644
index 0000000000..8b87c1c2f9
--- /dev/null
+++ b/plugins/CryptoPP/src/PGPw/sdk6/include/pgpEncode.h
@@ -0,0 +1,301 @@
+/*____________________________________________________________________________
+ pgpEncode.h
+
+ Copyright (C) 1997 Network Associates Inc. and affiliated companies.
+ All rights reserved.
+
+ This file contains the prototypes for functions which encode/decode files
+ and buffers.
+
+ $Id: pgpEncode.h,v 1.104 1999/05/07 23:47:46 hal Exp $
+____________________________________________________________________________*/
+
+#ifndef Included_pgpEncode_h /* [ */
+#define Included_pgpEncode_h
+
+#include "pgpPubTypes.h"
+#include "pgpTLS.h"
+
+#if PRAGMA_ALIGN_SUPPORTED
+#pragma options align=mac68k
+#endif
+
+/*
+ * The PGPEvent structure is used to notify clients of the encode API of
+ * various events.
+ */
+
+/* PGP Event types */
+
+enum PGPEventType_
+{
+ kPGPEvent_NullEvent = 0, /* Nothing happened */
+ kPGPEvent_InitialEvent = 1, /* Final event */
+ kPGPEvent_FinalEvent = 2, /* Final event */
+ kPGPEvent_ErrorEvent = 3, /* An error occurred */
+ kPGPEvent_WarningEvent = 4, /* Warning event */
+ kPGPEvent_EntropyEvent = 5, /* More entropy is needed */
+ kPGPEvent_PassphraseEvent = 6, /* A passphrase is needed */
+ kPGPEvent_InsertKeyEvent = 7, /* Smart card must be inserted */
+ kPGPEvent_AnalyzeEvent = 8, /* Initial analysis event,
+ before any output */
+ kPGPEvent_RecipientsEvent = 9, /* Recipient list report,
+ before any output */
+ kPGPEvent_KeyFoundEvent = 10, /* Key packet found */
+ kPGPEvent_OutputEvent = 11, /* Output specification needed */
+ kPGPEvent_SignatureEvent = 12, /* Signature status report */
+ kPGPEvent_BeginLexEvent = 13, /* Initial event per lexical unit*/
+ kPGPEvent_EndLexEvent = 14, /* Final event per lexical unit */
+ kPGPEvent_RecursionEvent = 15, /* Notification of recursive
+ job creation */
+ kPGPEvent_DetachedSignatureEvent = 16, /* Need input for verification of
+ detached signature */
+ kPGPEvent_KeyGenEvent = 17, /* Key generation progress */
+
+ kPGPEvent_KeyServerEvent = 18, /* Key Server progress */
+ kPGPEvent_KeyServerSignEvent= 19, /* Key Server passphrase */
+ kPGPEvent_KeyServerTLSEvent = 20, /* Key Server TLS event */
+ kPGPEvent_KeyServerIdleEvent= 21, /* Idle during keyserver call */
+
+ kPGPEvent_SocketsIdleEvent = 22, /* Idle during sockets */
+ kPGPEvent_DecryptionEvent = 23, /* Decryption data report */
+ kPGPEvent_EncryptionEvent = 24, /* Encryption data report */
+ PGP_ENUM_FORCE( PGPEventType_ )
+};
+PGPENUM_TYPEDEF( PGPEventType_, PGPEventType );
+
+
+/* PGP Analyze event callback codes */
+
+enum PGPAnalyzeType_
+{
+ kPGPAnalyze_Encrypted = 0, /* Encrypted message */
+ kPGPAnalyze_Signed = 1, /* Signed message */
+ kPGPAnalyze_DetachedSignature = 2, /* Detached signature */
+ kPGPAnalyze_Key = 3, /* Key data */
+ kPGPAnalyze_Unknown = 4, /* Non-pgp message */
+ kPGPAnalyze_X509Certificate = 5, /* X.509 certificate */
+
+ PGP_ENUM_FORCE( PGPAnalyzeType_ )
+};
+PGPENUM_TYPEDEF( PGPAnalyzeType_, PGPAnalyzeType );
+
+
+
+
+/* Individual event information structs, combined as a union in PGPEvent */
+
+typedef struct PGPEventNullData_
+{
+ PGPFileOffset bytesWritten;
+ PGPFileOffset bytesTotal;
+} PGPEventNullData;
+
+typedef struct PGPEventErrorData_
+{
+ PGPError error;
+ void *errorArg;
+} PGPEventErrorData;
+
+typedef struct PGPEventWarningData_
+{
+ PGPError warning;
+ void *warningArg;
+} PGPEventWarningData;
+
+typedef struct PGPEventEntropyData_
+{
+ PGPUInt32 entropyBitsNeeded;
+} PGPEventEntropyData;
+
+typedef struct PGPEventPassphraseData_
+{
+ PGPBoolean fConventional;
+ PGPKeySetRef keyset;
+} PGPEventPassphraseData;
+
+typedef struct PGPEventRecipientsData_
+{
+ PGPKeySetRef recipientSet;
+ PGPUInt32 conventionalPassphraseCount;
+ PGPUInt32 keyCount;
+ PGPKeyID const * keyIDArray;
+} PGPEventRecipientsData;
+
+typedef struct PGPEventKeyFoundData_
+{
+ PGPKeySetRef keySet;
+} PGPEventKeyFoundData;
+
+typedef struct PGPEventSignatureData_
+{
+ PGPKeyID signingKeyID;
+ PGPKeyRef signingKey;
+ PGPBoolean checked;
+ PGPBoolean verified;
+ PGPBoolean keyRevoked;
+ PGPBoolean keyDisabled;
+ PGPBoolean keyExpired;
+ PGPBoolean keyMeetsValidityThreshold;
+ PGPValidity keyValidity;
+ PGPTime creationTime;
+} PGPEventSignatureData;
+
+typedef struct PGPEventDecryptionData_
+{
+ PGPCipherAlgorithm cipherAlgorithm;
+ PGPByte *sessionKey;
+ PGPSize sessionKeyLength;
+} PGPEventDecryptionData;
+
+typedef struct PGPEventEncryptionData_
+{
+ PGPCipherAlgorithm cipherAlgorithm;
+ PGPByte *sessionKey;
+ PGPSize sessionKeyLength;
+} PGPEventEncryptionData;
+
+typedef struct PGPEventAnalyzeData_
+{
+ PGPAnalyzeType sectionType;
+} PGPEventAnalyzeData;
+
+typedef struct PGPEventOutputData_
+{
+ PGPUInt32 messageType;
+ char *suggestedName;
+ PGPBoolean forYourEyesOnly;
+} PGPEventOutputData;
+
+typedef struct PGPEventBeginLexData_
+{
+ PGPUInt32 sectionNumber;
+ PGPSize sectionOffset;
+} PGPEventBeginLexData;
+
+typedef struct PGPEventEndLexData_
+{
+ PGPUInt32 sectionNumber;
+} PGPEventEndLexData;
+
+typedef struct PGPEventKeyGenData_
+{
+ PGPUInt32 state;
+} PGPEventKeyGenData;
+
+typedef struct PGPEventKeyServerData_
+{
+ PGPKeyServerRef keyServerRef;
+ PGPUInt32 state; /* PGPKeyServerState */
+} PGPEventKeyServerData;
+
+typedef struct PGPEventKeyServerSignData_
+{
+ PGPKeyServerRef keyServerRef;
+} PGPEventKeyServerSignData;
+
+typedef struct PGPEventKeyServerTLSData_
+{
+ PGPKeyServerRef keyServerRef;
+ PGPUInt32 state; /* PGPKeyServerState */
+ PGPtlsSessionRef tlsSession;
+} PGPEventKeyServerTLSData;
+
+typedef struct PGPEventKeyServerIdleData_
+{
+ PGPKeyServerRef keyServerRef;
+} PGPEventKeyServerIdleData;
+
+
+/*
+ * The following events have no event-specific data defined for them:
+ * kPGPEvent_InsertKeyEvent
+ * kPGPEvent_RecursionEvent
+ * kPGPEvent_DetachedSignatureEvent
+ * kPGPEvent_InitialEvent
+ * kPGPEvent_FinalEvent
+ * kPGPEvent_SocketsIdleEvent
+ */
+
+/* Union of all event data structures above */
+typedef union PGPEventData_
+{
+ PGPEventNullData nullData;
+ PGPEventErrorData errorData;
+ PGPEventWarningData warningData;
+ PGPEventEntropyData entropyData;
+ PGPEventPassphraseData passphraseData;
+ PGPEventRecipientsData recipientsData;
+ PGPEventKeyFoundData keyFoundData;
+ PGPEventSignatureData signatureData;
+ PGPEventDecryptionData decryptionData;
+ PGPEventEncryptionData encryptionData;
+ PGPEventAnalyzeData analyzeData;
+ PGPEventOutputData outputData;
+ PGPEventBeginLexData beginLexData;
+ PGPEventEndLexData endLexData;
+ PGPEventKeyGenData keyGenData;
+ PGPEventKeyServerData keyServerData;
+ PGPEventKeyServerSignData keyServerSignData;
+ PGPEventKeyServerTLSData keyServerTLSData;
+ PGPEventKeyServerIdleData keyServerIdleData;
+} PGPEventData;
+
+/* Refs to internal "job" structure */
+typedef struct PGPJob * PGPJobRef;
+
+#define kInvalidPGPJobRef ((PGPJobRef) NULL)
+#define PGPJobRefIsValid( ref ) ( (ref) != kInvalidPGPJobRef )
+
+/* PGPEvent structure */
+
+struct PGPEvent
+{
+ PGPVersion version; /* Version of event structure */
+ struct PGPEvent_ *nextEvent; /* Allow lists of events */
+ PGPJobRef job; /* Associated with what job */
+ PGPEventType type; /* Type of event */
+ PGPEventData data; /* Event specific data */
+};
+typedef struct PGPEvent PGPEvent;
+
+
+#if PRAGMA_ALIGN_SUPPORTED
+#pragma options align=reset
+#endif
+
+PGP_BEGIN_C_DECLARATIONS
+
+#if PRAGMA_IMPORT_SUPPORTED
+#pragma import on
+#endif
+
+/*
+** Functions to encode and decode. The variable parameters are one or more
+** PGPOptionListRef's which describe the inputs, outputs, and options.
+*/
+
+PGPError PGPEncode(PGPContextRef context,
+ PGPOptionListRef firstOption, ...);
+PGPError PGPDecode(PGPContextRef context,
+ PGPOptionListRef firstOption, ...);
+
+PGPError PGPAddJobOptions(PGPJobRef job,
+ PGPOptionListRef firstOption, ...);
+
+#if PRAGMA_IMPORT_SUPPORTED
+#pragma import reset
+#endif
+PGP_END_C_DECLARATIONS
+
+#endif /* ] Included_pgpEncode_h */
+
+
+/*__Editor_settings____
+
+ Local Variables:
+ tab-width: 4
+ End:
+ vi: ts=4 sw=4
+ vim: si
+_____________________*/