2 $Id: zdmic.h,v 1.1.1.1 2006/07/13 10:27:54 mzcai Exp $
4 /***********************************************************************/
5 /* Copyright 2003 by ZyDAS Technology Corporation */
7 /***********************************************************************/
8 /***********************************************************************/
10 /* FILE DESCRIPTION MIChael.h */
11 /* Header file required for TKIP MIC */
20 /* Liam,Hwu ZyDAS Technology Corporation 2003 */
22 /***********************************************************************/
27 // Rotation functions on 32 bit values
29 ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) )
31 #define ROR32(A, n) ROL32( (A), 32-(n) )
38 U32 L
, R
; // Current state
39 U32 M
; // Message accumulator (single word)
40 int nBytesInM
; // # bytes in M
41 } MICvar
; // variable for MIC
44 // Clear the internal message,
45 // resets the object to the state just after construction.
46 void MICclear(MICvar
*MIC
);
49 // Set the key to a new value
50 void MICsetKey(U8
*key
, MICvar
*MIC
);
53 // Get the MIC result. Destination should accept 8 bytes of result.
54 // This also resets the message to empty.
56 void MICgetMIC(U8
*dst
, MICvar
*MIC
);
59 // Add a single byte to the internal message
60 void MICappendByte(U8 b
, MICvar
*MIC
);
61 void MICappendArr(U8
*pb
, MICvar
*MIC
, U32 Size
);
64 // Get U32 from 4 bytes LSByte first
68 // Put U32 into 4 bytes LSByte first
69 void putUInt32(U8
*p
, U32 val
);