2011-01-06 15:20:01 +01:00
|
|
|
/**
|
2015-05-26 11:04:15 +02:00
|
|
|
* \file md_internal.h
|
2014-05-01 13:03:14 +02:00
|
|
|
*
|
2011-01-06 15:20:01 +01:00
|
|
|
* \brief Message digest wrappers.
|
|
|
|
*
|
2015-03-24 12:13:30 +01:00
|
|
|
* \warning This in an internal header. Do not include directly.
|
|
|
|
*
|
2011-01-06 15:20:01 +01:00
|
|
|
* \author Adriaan de Jong <dejong@fox-it.com>
|
2018-01-05 16:33:17 +01:00
|
|
|
*/
|
|
|
|
/*
|
2015-03-24 12:13:30 +01:00
|
|
|
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
2015-09-04 14:21:07 +02:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2011-01-06 15:20:01 +01:00
|
|
|
*
|
2015-09-04 14:21:07 +02:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
* not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2011-01-06 15:20:01 +01:00
|
|
|
*
|
2015-09-04 14:21:07 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2011-01-06 15:20:01 +01:00
|
|
|
*
|
2015-09-04 14:21:07 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
2011-01-06 15:20:01 +01:00
|
|
|
*
|
2015-09-04 14:21:07 +02:00
|
|
|
* This file is part of mbed TLS (https://tls.mbed.org)
|
2011-01-06 15:20:01 +01:00
|
|
|
*/
|
2015-04-08 12:49:31 +02:00
|
|
|
#ifndef MBEDTLS_MD_WRAP_H
|
|
|
|
#define MBEDTLS_MD_WRAP_H
|
2011-01-06 15:20:01 +01:00
|
|
|
|
2015-04-08 12:49:31 +02:00
|
|
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
2019-07-04 21:01:14 +02:00
|
|
|
#include "mbedtls/config.h"
|
2014-04-29 12:39:06 +02:00
|
|
|
#else
|
2015-04-08 12:49:31 +02:00
|
|
|
#include MBEDTLS_CONFIG_FILE
|
2014-04-29 12:39:06 +02:00
|
|
|
#endif
|
2015-02-13 15:12:07 +01:00
|
|
|
|
2019-07-04 21:01:14 +02:00
|
|
|
#include "mbedtls/md.h"
|
2011-01-06 15:20:01 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-03-24 12:13:30 +01:00
|
|
|
/**
|
|
|
|
* Message digest information.
|
|
|
|
* Allows message digest functions to be called in a generic way.
|
|
|
|
*/
|
2015-04-08 12:49:31 +02:00
|
|
|
struct mbedtls_md_info_t
|
2015-04-02 15:43:57 +02:00
|
|
|
{
|
2015-03-24 12:13:30 +01:00
|
|
|
/** Name of the message digest */
|
|
|
|
const char * name;
|
|
|
|
|
2019-07-19 16:03:39 +02:00
|
|
|
/** Digest identifier */
|
|
|
|
mbedtls_md_type_t type;
|
|
|
|
|
2015-06-18 14:58:58 +02:00
|
|
|
/** Output length of the digest function in bytes */
|
2019-07-19 16:03:39 +02:00
|
|
|
unsigned char size;
|
2015-03-24 12:13:30 +01:00
|
|
|
|
2015-06-18 14:58:58 +02:00
|
|
|
/** Block length of the digest function in bytes */
|
2019-07-19 16:03:39 +02:00
|
|
|
unsigned char block_size;
|
2015-03-24 12:13:30 +01:00
|
|
|
};
|
|
|
|
|
2015-04-08 12:49:31 +02:00
|
|
|
#if defined(MBEDTLS_MD2_C)
|
|
|
|
extern const mbedtls_md_info_t mbedtls_md2_info;
|
2011-01-06 15:20:01 +01:00
|
|
|
#endif
|
2015-04-08 12:49:31 +02:00
|
|
|
#if defined(MBEDTLS_MD4_C)
|
|
|
|
extern const mbedtls_md_info_t mbedtls_md4_info;
|
2011-01-06 15:20:01 +01:00
|
|
|
#endif
|
2015-04-08 12:49:31 +02:00
|
|
|
#if defined(MBEDTLS_MD5_C)
|
|
|
|
extern const mbedtls_md_info_t mbedtls_md5_info;
|
2011-01-06 15:20:01 +01:00
|
|
|
#endif
|
2015-04-08 12:49:31 +02:00
|
|
|
#if defined(MBEDTLS_RIPEMD160_C)
|
|
|
|
extern const mbedtls_md_info_t mbedtls_ripemd160_info;
|
2014-01-17 20:41:32 +01:00
|
|
|
#endif
|
2015-04-08 12:49:31 +02:00
|
|
|
#if defined(MBEDTLS_SHA1_C)
|
|
|
|
extern const mbedtls_md_info_t mbedtls_sha1_info;
|
2011-01-06 15:20:01 +01:00
|
|
|
#endif
|
2015-04-08 12:49:31 +02:00
|
|
|
#if defined(MBEDTLS_SHA256_C)
|
|
|
|
extern const mbedtls_md_info_t mbedtls_sha224_info;
|
|
|
|
extern const mbedtls_md_info_t mbedtls_sha256_info;
|
2011-01-06 15:20:01 +01:00
|
|
|
#endif
|
2015-04-08 12:49:31 +02:00
|
|
|
#if defined(MBEDTLS_SHA512_C)
|
|
|
|
extern const mbedtls_md_info_t mbedtls_sha384_info;
|
|
|
|
extern const mbedtls_md_info_t mbedtls_sha512_info;
|
2011-01-06 15:20:01 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-04-08 12:49:31 +02:00
|
|
|
#endif /* MBEDTLS_MD_WRAP_H */
|