![]() |
![]() |
![]() |
Ximian Connector for Microsoft Exchange Programmer’s Reference Manual | ![]() |
---|
xntlm-desxntlm-des — DES encryption/decryption |
typedef XNTLM_DES_KS; void xntlm_deskey (XNTLM_DES_KS ks, unsigned char *key, int decrypt); void xntlm_des (XNTLM_DES_KS ks, unsigned char block[8]);
These routines implement DES encryption and decryption. They are here primarly for xntlm-internal use, but can also be used by other code.
typedef guint32 XNTLM_DES_KS[16][2];
This represents a DES key schedule. After initializing it with
xntlm_deskey()
, you can then pass it to xntlm_des()
as many time as
you need.
void xntlm_deskey (XNTLM_DES_KS ks, unsigned char *key, int decrypt);
Sets up ks
based on key
. You must call this to initialize the key
schedule before calling xntlm_des()
.
ks : |
key schedule to fill in |
key : |
the encryption key |
decrypt : |
0 for encryption, 1 for decryption |
void xntlm_des (XNTLM_DES_KS ks, unsigned char block[8]);
DES encrypts/decrypts (according to ks
) a single block in ECB mode.
ks : |
the key schedule to use |
block : |
the block of data to encrypt or decrypt |
<< xntlm | xntlm-md4 >> |