2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 * Purpose: Reference implementation for Michael
23 * written by Niels Ferguson
36 /*--------------------- Export Definitions -------------------------*/
38 /*--------------------- Export Types ------------------------------*/
40 VOID MIC_vInit(DWORD dwK0, DWORD dwK1);
42 VOID MIC_vUnInit(void);
44 // Append bytes to the message to be MICed
45 VOID MIC_vAppend(PBYTE src, UINT nBytes);
47 // Get the MIC result. Destination should accept 8 bytes of result.
48 // This also resets the message to empty.
49 VOID MIC_vGetMIC(PDWORD pdwL, PDWORD pdwR);
51 /*--------------------- Export Macros ------------------------------*/
53 // Rotation functions on 32 bit values
54 #define ROL32( A, n ) \
55 ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) )
56 #define ROR32( A, n ) ROL32( (A), 32-(n) )
58 #endif //__MICHAEL_H__