Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers md_internal.h Source File

md_internal.h

Go to the documentation of this file.
00001 /**
00002  * \file md_internal.h
00003  *
00004  * \brief Message digest wrappers.
00005  *
00006  * \warning This in an internal header. Do not include directly.
00007  *
00008  * \author Adriaan de Jong <dejong@fox-it.com>
00009  */
00010 /*
00011  *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
00012  *  SPDX-License-Identifier: Apache-2.0
00013  *
00014  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00015  *  not use this file except in compliance with the License.
00016  *  You may obtain a copy of the License at
00017  *
00018  *  http://www.apache.org/licenses/LICENSE-2.0
00019  *
00020  *  Unless required by applicable law or agreed to in writing, software
00021  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00022  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00023  *  See the License for the specific language governing permissions and
00024  *  limitations under the License.
00025  *
00026  *  This file is part of mbed TLS (https://tls.mbed.org)
00027  */
00028 #ifndef MBEDTLS_MD_WRAP_H
00029 #define MBEDTLS_MD_WRAP_H
00030 
00031 #if !defined(MBEDTLS_CONFIG_FILE)
00032 #include "mbedtls/config.h"
00033 #else
00034 #include MBEDTLS_CONFIG_FILE
00035 #endif
00036 
00037 #include "mbedtls/md.h"
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 /**
00044  * Message digest information.
00045  * Allows message digest functions to be called in a generic way.
00046  */
00047 struct mbedtls_md_info_t
00048 {
00049     /** Name of the message digest */
00050     const char * name;
00051 
00052     /** Digest identifier */
00053     mbedtls_md_type_t type;
00054 
00055     /** Output length of the digest function in bytes */
00056     unsigned char size;
00057 
00058     /** Block length of the digest function in bytes */
00059     unsigned char block_size;
00060 };
00061 
00062 #if defined(MBEDTLS_MD2_C)
00063 extern const mbedtls_md_info_t mbedtls_md2_info;
00064 #endif
00065 #if defined(MBEDTLS_MD4_C)
00066 extern const mbedtls_md_info_t mbedtls_md4_info;
00067 #endif
00068 #if defined(MBEDTLS_MD5_C)
00069 extern const mbedtls_md_info_t mbedtls_md5_info;
00070 #endif
00071 #if defined(MBEDTLS_RIPEMD160_C)
00072 extern const mbedtls_md_info_t mbedtls_ripemd160_info;
00073 #endif
00074 #if defined(MBEDTLS_SHA1_C)
00075 extern const mbedtls_md_info_t mbedtls_sha1_info;
00076 #endif
00077 #if defined(MBEDTLS_SHA256_C)
00078 extern const mbedtls_md_info_t mbedtls_sha224_info;
00079 extern const mbedtls_md_info_t mbedtls_sha256_info;
00080 #endif
00081 #if defined(MBEDTLS_SHA512_C)
00082 extern const mbedtls_md_info_t mbedtls_sha384_info;
00083 extern const mbedtls_md_info_t mbedtls_sha512_info;
00084 #endif
00085 
00086 #ifdef __cplusplus
00087 }
00088 #endif
00089 
00090 #endif /* MBEDTLS_MD_WRAP_H */