Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / pci / n8 / common / api / n8_precomp_md5.h
blob3e667000e07dfe59d537b9fa2ac3b91505999fbb
1 /*-
2 * Copyright (C) 2001-2003 by NBMK Encryption Technologies.
3 * All rights reserved.
5 * NBMK Encryption Technologies provides no support of any kind for
6 * this software. Questions or concerns about it may be addressed to
7 * the members of the relevant open-source community at
8 * <tech-crypto@netbsd.org>.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are
12 * met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above
18 * copyright notice, this list of conditions and the following
19 * disclaimer in the documentation and/or other materials provided
20 * with the distribution.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 /*****************************************************************************/
36 /** @file n8_precomp_md5.c
37 * @brief Private version of md5 for n8_precompute_*.
39 * A more detailed description of the file.
41 *****************************************************************************/
43 /*****************************************************************************
44 * Revision history:
45 * 01/22/02 dws Original version.
46 ****************************************************************************/
47 #ifndef N8_PRECOMP_MD5_H
48 #define N8_PRECOMP_MD5_H
50 /********************/
51 /* MD5 definitions. */
52 /********************/
53 #define MD5_LONG unsigned int
54 #define MD5_CBLOCK 64
55 #define MD5_LBLOCK (MD5_CBLOCK/4)
56 #define MD5_DIGEST_LENGTH 16
58 typedef struct
60 MD5_LONG A,B,C,D;
61 MD5_LONG Nl,Nh;
62 MD5_LONG data[MD5_LBLOCK];
63 int num;
64 } N8_PRECOMP_MD5_CTX;
68 void n8_precomp_MD5_Init(N8_PRECOMP_MD5_CTX *c);
69 void n8_precomp_MD5_Update(N8_PRECOMP_MD5_CTX *c,
70 const void *data,
71 unsigned long len);
72 void n8_precomp_MD5_Final(unsigned char *md,
73 N8_PRECOMP_MD5_CTX *c);
75 #endif