~ubuntu-branches/ubuntu/lucid/linux-rt/lucid

« back to all changes in this revision

Viewing changes to drivers/staging/vt6655/michael.h

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2009-08-05 23:00:52 UTC
  • Revision ID: james.westby@ubuntu.com-20090805230052-7xedvqcyk9dnnxb2
Tags: 2.6.31-1.1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 
3
 * All rights reserved.
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
18
 *
 
19
 *
 
20
 * File: Michael.h
 
21
 *
 
22
 * Purpose: Reference implementation for Michael
 
23
 *          written by Niels Ferguson
 
24
 *
 
25
 * Author: Kyle Hsu
 
26
 *
 
27
 * Date: Jan 2, 2003
 
28
 *
 
29
 */
 
30
 
 
31
 
 
32
#ifndef __MICHAEL_H__
 
33
#define __MICHAEL_H__
 
34
 
 
35
#if !defined(__UMEM_H__)
 
36
#include "umem.h"
 
37
#endif
 
38
/*---------------------  Export Definitions -------------------------*/
 
39
 
 
40
/*---------------------  Export Types  ------------------------------*/
 
41
 
 
42
VOID MIC_vInit(DWORD dwK0, DWORD dwK1);
 
43
 
 
44
VOID MIC_vUnInit(void);
 
45
 
 
46
// Append bytes to the message to be MICed
 
47
VOID MIC_vAppend(PBYTE src, UINT nBytes);
 
48
 
 
49
// Get the MIC result. Destination should accept 8 bytes of result.
 
50
// This also resets the message to empty.
 
51
VOID MIC_vGetMIC(PDWORD pdwL, PDWORD pdwR);
 
52
 
 
53
/*---------------------  Export Macros ------------------------------*/
 
54
 
 
55
// Rotation functions on 32 bit values
 
56
#define ROL32( A, n ) \
 
57
 ( ((A) << (n)) | ( ((A)>>(32-(n)))  & ( (1UL << (n)) - 1 ) ) )
 
58
#define ROR32( A, n ) ROL32( (A), 32-(n) )
 
59
 
 
60
#endif //__MICHAEL_H__
 
61
 
 
62