home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / crypl200.zip / KEYMGMT / KEYMGMT.H < prev    next >
Text File  |  1996-09-29  |  1KB  |  37 lines

  1. /****************************************************************************
  2. *                                                                            *
  3. *                cryptlib Key Management Structures and Prototypes             *
  4. *                        Copyright Peter Gutmann 1996                        *
  5. *                                                                            *
  6. ****************************************************************************/
  7.  
  8. #ifndef _KEYMGMT_DEFINED
  9.  
  10. #define _KEYMGMT_DEFINED
  11.  
  12. /* A structure to hold general key-related information for the xxxGetKey()
  13.    functions */
  14.  
  15. typedef struct {
  16.     /* Key ID information */
  17.     void *keyID;                /* The key/user ID */
  18.     int keyIDsize;                /* The size of the key/user ID */
  19.     BOOLEAN isKeyID;            /* Whether this is a key ID */
  20.  
  21.     /* Miscellaneous information */
  22.     BOOLEAN isPublicKey;        /* Whether we want the public key */
  23.     void *password;                /* Password to decrypt the private key */
  24.     int passwordSize;            /* The size of the password */
  25.     } GETKEY_INFO;
  26.  
  27. /* Prototypes for external key read functions */
  28.  
  29. KEYSET_SUBTYPE pgpGetKeysetType( FILE *filePtr );
  30. int pgpGetKey( FILE *filePtr, CRYPT_CONTEXT *cryptContext,
  31.                const GETKEY_INFO *getKeyInfo );
  32. KEYSET_SUBTYPE x509GetKeysetType( FILE *filePtr );
  33. int x509GetKey( FILE *filePtr, CRYPT_CONTEXT *cryptContext,
  34.                 const GETKEY_INFO *getKeyInfo );
  35.  
  36. #endif /* _KEYMGMT_DEFINED */
  37.