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