2017-10-01 02:30:55 +08:00
|
|
|
#ifndef HEADER_CURL_SHA256_H
|
|
|
|
#define HEADER_CURL_SHA256_H
|
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2020-02-23 02:17:12 +08:00
|
|
|
* Copyright (C) 2017, Florin Petriuc, <petriuc.florin@gmail.com>
|
2022-01-21 21:32:16 +08:00
|
|
|
* Copyright (C) 2018 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
2017-10-01 02:30:55 +08:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2017-10-01 02:30:55 +08:00
|
|
|
*
|
|
|
|
* 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
|
2022-05-17 17:16:50 +08:00
|
|
|
*
|
2017-10-01 02:30:55 +08:00
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef CURL_DISABLE_CRYPTO_AUTH
|
2022-09-07 18:19:29 +08:00
|
|
|
#include <curl/curl.h>
|
2020-07-03 21:12:57 +08:00
|
|
|
#include "curl_hmac.h"
|
|
|
|
|
|
|
|
extern const struct HMAC_params Curl_HMAC_SHA256[1];
|
2017-10-01 02:30:55 +08:00
|
|
|
|
2021-10-02 07:06:55 +08:00
|
|
|
#ifdef USE_WOLFSSL
|
|
|
|
/* SHA256_DIGEST_LENGTH is an enum value in wolfSSL. Need to import it from
|
|
|
|
* sha.h*/
|
|
|
|
#include <wolfssl/options.h>
|
2022-01-21 21:32:16 +08:00
|
|
|
#include <wolfssl/openssl/sha.h>
|
2021-10-02 07:06:55 +08:00
|
|
|
#else
|
2020-02-23 02:17:12 +08:00
|
|
|
#define SHA256_DIGEST_LENGTH 32
|
2021-10-02 07:06:55 +08:00
|
|
|
#endif
|
2020-02-23 02:17:12 +08:00
|
|
|
|
2021-12-10 21:33:39 +08:00
|
|
|
CURLcode Curl_sha256it(unsigned char *outbuffer, const unsigned char *input,
|
|
|
|
const size_t len);
|
2017-10-01 02:30:55 +08:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* HEADER_CURL_SHA256_H */
|