5 #define SHA_DIGEST_LEN 20
13 void MD5Init(struct MD5Context
*context
);
14 void MD5Update(struct MD5Context
*context
, unsigned char *buf
, unsigned len
);
15 void MD5Final(unsigned char digest
[16], struct MD5Context
*context
);
16 void MD5Transform(u32 buf
[4], u32 in
[16]);
18 typedef struct MD5Context MD5_CTX
;
21 void md5_mac(u8
*key
, size_t key_len
, u8
*data
, size_t data_len
, u8
*mac
);
22 void hmac_md5(u8
*key
, size_t key_len
, u8
*data
, size_t data_len
, u8
*mac
);
30 #define uint8 unsigned char
34 #define uint32 unsigned long int
39 uint32 erk
[64]; /* encryption round keys */
40 uint32 drk
[64]; /* decryption round keys */
41 int nr
; /* number of rounds */
45 int aes_set_key( aes_context
*ctx
, uint8
*key
, int nbits
);
46 void aes_encrypt( aes_context
*ctx
, uint8 input
[16], uint8 output
[16] );
47 void aes_decrypt( aes_context
*ctx
, uint8 input
[16], uint8 output
[16] );
50 void SHAInit(SHA_CTX
*ctx
);
51 void SHAUpdate(SHA_CTX
*ctx
, unsigned char *dataIn
, int len
);
52 void SHAFinal(SHA_CTX
*ctx
, unsigned char hashout
[20]);
53 void SHAHashBlock(SHA_CTX
*ctx
);
54 void hmac_sha1(unsigned char *text
, int text_len
, unsigned char *key
, int key_len
, unsigned char *digest
);
55 void F(char *password
, unsigned char *ssid
, int ssidlength
, int iterations
, int count
, unsigned char *output
);
56 int PasswordHash(char *password
, unsigned char *ssid
, int ssidlength
, unsigned char *output
);