File: nccurl_sha256.h

package info (click to toggle)
netcdf 1%3A4.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 115,904 kB
  • sloc: ansic: 278,886; sh: 14,183; cpp: 5,971; yacc: 2,612; makefile: 1,999; lex: 1,218; javascript: 280; xml: 173; awk: 2
file content (53 lines) | stat: -rw-r--r-- 1,939 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef HEADER_CURL_SHA256_H
#define HEADER_CURL_SHA256_H
/*********************************************************************
*    Copyright 2018, UCAR/Unidata
*    See netcdf/COPYRIGHT file for copying and redistribution conditions.
* ********************************************************************/
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) Florin Petriuc, <petriuc.florin@gmail.com>
 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 * SPDX-License-Identifier: curl
 *
 ***************************************************************************/


#include "nccurl_setup.h"
#include "nccurl_hmac.h"

#ifndef CURL_DISABLE_CRYPTO_AUTH

extern const struct HMAC_params Curl_HMAC_SHA256[1];

#ifdef USE_WOLFSSL
/* SHA256_DIGEST_LENGTH is an enum value in wolfSSL. Need to import it from
 * sha.h */
#include <wolfssl/options.h>
#include <wolfssl/openssl/sha.h>
#else
#define SHA256_DIGEST_LENGTH 32
#endif

EXTERNL CURLcode Curl_sha256it(unsigned char *outbuffer, const unsigned char *input,
                       const size_t len);
#endif

#endif /* HEADER_CURL_SHA256_H */