~ubuntu-branches/ubuntu/precise/rt2570/precise

« back to all changes in this revision

Viewing changes to Module/sha1.h

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno
  • Date: 2005-05-29 19:03:04 UTC
  • Revision ID: james.westby@ubuntu.com-20050529190304-2brtsi5bwy4wp3bo
Tags: upstream-1.1.0+cvs20060421
ImportĀ upstreamĀ versionĀ 1.1.0+cvs20060421

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*************************************************************************** 
 
2
 * RT2x00 SourceForge Project - http://rt2x00.sourceforge.net              * 
 
3
 *                                                                         * 
 
4
 *   This program is free software; you can redistribute it and/or modify  * 
 
5
 *   it under the terms of the GNU General Public License as published by  * 
 
6
 *   the Free Software Foundation; either version 2 of the License, or     * 
 
7
 *   (at your option) any later version.                                   * 
 
8
 *                                                                         * 
 
9
 *   This program is distributed in the hope that it will be useful,       * 
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        * 
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         * 
 
12
 *   GNU General Public License for more details.                          * 
 
13
 *                                                                         * 
 
14
 *   You should have received a copy of the GNU General Public License     * 
 
15
 *   along with this program; if not, write to the                         * 
 
16
 *   Free Software Foundation, Inc.,                                       * 
 
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             * 
 
18
 *                                                                         * 
 
19
 *   Licensed under the GNU GPL                                            * 
 
20
 *   Original code supplied under license from RaLink Inc, 2004.           * 
 
21
 ***************************************************************************/
 
22
 
 
23
/*************************************************************************** 
 
24
 *      Module Name:    sha1.h
 
25
 *
 
26
 *      Abstract:
 
27
 *
 
28
 *      Revision History:
 
29
 *      Who             When            What
 
30
 *      --------        ----------      -------------------------------
 
31
 *      Name            Date            Modification logs
 
32
 *      Jan Lee         2005-06-01      Release
 
33
 ***************************************************************************/
 
34
 
 
35
#ifndef SHA1_H
 
36
#define SHA1_H
 
37
 
 
38
#define A_SHA_DIGEST_LEN 20
 
39
 
 
40
typedef struct 
 
41
{
 
42
    unsigned long   H[5];
 
43
    unsigned long   W[80];
 
44
    int             lenW;
 
45
    unsigned long   sizeHi,sizeLo;
 
46
} A_SHA_CTX;
 
47
 
 
48
void A_SHAInit(A_SHA_CTX *ctx);
 
49
void A_SHAUpdate(A_SHA_CTX *ctx, unsigned char *dataIn, int len);
 
50
void A_SHAFinal(A_SHA_CTX *ctx, unsigned char hashout[20]);
 
51
void shaHashBlock(A_SHA_CTX *ctx);
 
52
 void F(char *password, unsigned char *ssid, int ssidlength, int iterations, int count, unsigned char *output);
 
53
int PasswordHash(char *password, unsigned char *ssid, int ssidlength, unsigned char *output);
 
54
 
 
55
#endif /* SHA1_H */
 
56