summaryrefslogtreecommitdiff
path: root/cryptopp/PGPw/sdk8/include/pgpShare.h
diff options
context:
space:
mode:
authorwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-04-21 14:14:52 +0000
committerwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2011-04-21 14:14:52 +0000
commitcb4a46e7fbe62d788e66ed6121c717a2d22a4d7c (patch)
tree30df260fdc5a1b5a7049c2f8cac8b7ef17513d6d /cryptopp/PGPw/sdk8/include/pgpShare.h
parent19b6f534d2e784a1e120bf52c4aa07004798f473 (diff)
svn.miranda.im is moving to a new home!
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@7 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'cryptopp/PGPw/sdk8/include/pgpShare.h')
-rw-r--r--cryptopp/PGPw/sdk8/include/pgpShare.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/cryptopp/PGPw/sdk8/include/pgpShare.h b/cryptopp/PGPw/sdk8/include/pgpShare.h
new file mode 100644
index 0000000..04d6da5
--- /dev/null
+++ b/cryptopp/PGPw/sdk8/include/pgpShare.h
@@ -0,0 +1,80 @@
+/*____________________________________________________________________________
+ Copyright (C) 2002 PGP Corporation
+ All rights reserved.
+
+ $Id: pgpShare.h,v 1.1 2004/04/01 11:45:40 wprice Exp $
+____________________________________________________________________________*/
+#ifndef Included_pgpShare_h /* [ */
+#define Included_pgpShare_h
+
+#include "pgpConfig.h"
+#include "pgpBase.h"
+#include "pgpKeys.h"
+
+typedef struct PGPShare * PGPShareRef;
+
+typedef struct PGPShareID_
+{
+ PGPByte data[8];
+} PGPShareID;
+
+#define kInvalidPGPShareRef ((PGPShareRef) NULL)
+#define PGPShareRefIsValid( ref ) ( (ref) != kInvalidPGPShareRef )
+
+PGP_BEGIN_C_DECLARATIONS
+#if PRAGMA_IMPORT_SUPPORTED
+#pragma import on
+#endif
+
+PGPError PGPCreateShares(PGPContextRef context, PGPKeyDBObjRef key,
+ PGPUInt32 threshold, PGPUInt32 numShares,
+ PGPShareRef *share);
+
+/* The passkey needs to be freed with PGPFreeData(passkey) */
+PGPError PGPGetPasskeyFromShares(PGPShareRef share, PGPByte **passkey,
+ PGPSize *passkeySize);
+
+PGPError PGPSplitShares(PGPShareRef share, PGPUInt32 numShares,
+ PGPShareRef *splitShares);
+
+/* The share objects being combined are NOT freed by this function */
+PGPError PGPCombineShares(PGPShareRef firstShare, PGPShareRef secondShare,
+ PGPShareRef *combinedShares);
+
+PGPError PGPFreeShares(PGPShareRef share);
+
+PGPError PGPGetKeyIDFromShares(PGPShareRef share, PGPKeyID *id);
+
+PGPError PGPGetShareID(PGPShareRef share, PGPShareID *id);
+
+PGPUInt32 PGPGetShareThreshold(PGPShareRef share);
+
+/* This is the number of shares contained in the share object */
+PGPUInt32 PGPGetNumberOfShares(PGPShareRef share);
+
+/* The share object may contain less than the total number of shares */
+PGPUInt32 PGPGetTotalNumberOfShares(PGPShareRef share);
+
+PGPBoolean IsSamePGPShares(PGPShareRef firstShare, PGPShareRef secondShare);
+
+/* If firstID < secondID, -1 */
+/* If firstID > secondID, 1 */
+/* If firstID = secondID, 0 */
+PGPInt32 PGPCompareShareIDs(PGPShareID firstID, PGPShareID secondID);
+
+#if PRAGMA_IMPORT_SUPPORTED
+#pragma import reset
+#endif
+PGP_END_C_DECLARATIONS
+
+#endif /* ] Included_pgpShare_h */
+
+
+/*__Editor_settings____
+
+ Local Variables:
+ tab-width: 4
+ End:
+ vi: ts=4 sw=4
+ vim: si
+_____________________*/