Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.7 KiB

#ifndef _CRYPT_
#define _CRYPT_
#ifdef __cplusplus
extern "C" {
#endif
/*Definitions---------------------------------------------------------------*/
#define WSSA_CRYPT_RC2 0x1002
#define WSSA_CRYPT_RC4 0x1004
#define WSSA_CRYPT_IDEA 0x2001
#define WSSA_CRYPT_DES 0x3001
#define WSSA_CRYPT_3DES 0x3003
/*Structures----------------------------------------------------------------*/
typedef struct tagCipherInfo{
unsigned char rgSig[3]; //3 byte signature as defined in SSL standard
int nClearKeyLen; //Length in bytes of master key that will be transported clear
int nKeyLen; //Length in bytes of master key that will be transported encrypted
int nFeedback; //Length of key arguements
int nCryptoType; //Crypto id for use in wssacrypt
} CipherInfo;
typedef struct tagWssaCryptInfo{
CipherInfo *pCipherInfo;//Specs for cipher we are using
char *pKey; //Pointer to key
char *pFeedback; //Feedback data. Used in block ciphers
void *pData; //Data used by cipher spec
int nOption; //Option, encrypt, decrypt, or both
}WssaCryptInfo;
/*Functions-----------------------------------------------------------------*/
int WssaCryptInit (WssaCryptInfo *pwci, char *pKey, char *pFeedback, CipherInfo *pCipherInfo, int nOption);
int WssaCryptTransform(WssaCryptInfo *pwci, char *pBuf, int nBuf);
void WssaCryptUninit (WssaCryptInfo *pwci);
#ifdef __cplusplus
}
#endif
#endif
/*_CRYPT_*/