Sync usage with man page.
[netbsd-mini2440.git] / sys / dev / pci / n8 / common / api / n8_precompute.h
blobcabb9617de5797e09911c8d5ad52e4474fa31bfb
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_precompute.h
37 * @brief Precomputes IPAD and OPAD values for SSL and TLS MACs.
38 *****************************************************************************/
40 /*****************************************************************************
41 * Revision history:
42 * 08/06/02 bac Added hashed_key_p to n8_precompute_tls_ipad_opad so that
43 * the key isn't modified in place.
44 * 01/23/02 dws Changed n8_precompute_tls_ipad_opad parameter
45 * secret_length to a pointer.
46 * 01/22/02 dws Original version.
47 ****************************************************************************/
48 #ifndef N8_PRECOMPUTE_H
49 #define N8_PRECOMPUTE_H
50 #include "n8_pub_common.h"
52 N8_Status_t n8_precompute_ssl_ipad_opad(N8_Buffer_t *secret_p,
53 uint32_t *ipad_p,
54 uint32_t *opad_p);
56 N8_Status_t n8_precompute_tls_ipad_opad(const N8_HashAlgorithm_t hash_alg,
57 const N8_Buffer_t *secret_p,
58 N8_Buffer_t *hashed_key_p,
59 uint32_t *secret_length_p,
60 uint32_t *ipad_p,
61 uint32_t *opad_p);
62 #endif