OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
md_internal.h
Go to the documentation of this file.
1 
10 /*
11  * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
12  * SPDX-License-Identifier: Apache-2.0
13  *
14  * Licensed under the Apache License, Version 2.0 (the "License"); you may
15  * not use this file except in compliance with the License.
16  * You may obtain a copy of the License at
17  *
18  * http://www.apache.org/licenses/LICENSE-2.0
19  *
20  * Unless required by applicable law or agreed to in writing, software
21  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
22  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23  * See the License for the specific language governing permissions and
24  * limitations under the License.
25  *
26  * This file is part of mbed TLS (https://tls.mbed.org)
27  */
28 #ifndef MBEDTLS_MD_WRAP_H
29 #define MBEDTLS_MD_WRAP_H
30 
31 #if !defined(MBEDTLS_CONFIG_FILE)
32 #include "config.h"
33 #else
34 #include MBEDTLS_CONFIG_FILE
35 #endif
36 
37 #include "md.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
48 {
51 
53  const char * name;
54 
56  int size;
57 
60 
62  int (*starts_func)( void *ctx );
63 
65  int (*update_func)( void *ctx, const unsigned char *input, size_t ilen );
66 
68  int (*finish_func)( void *ctx, unsigned char *output );
69 
71  int (*digest_func)( const unsigned char *input, size_t ilen,
72  unsigned char *output );
73 
75  void * (*ctx_alloc_func)( void );
76 
78  void (*ctx_free_func)( void *ctx );
79 
81  void (*clone_func)( void *dst, const void *src );
82 
84  int (*process_func)( void *ctx, const unsigned char *input );
85 };
86 
87 #if defined(MBEDTLS_MD2_C)
88 extern const mbedtls_md_info_t mbedtls_md2_info;
89 #endif
90 #if defined(MBEDTLS_MD4_C)
91 extern const mbedtls_md_info_t mbedtls_md4_info;
92 #endif
93 #if defined(MBEDTLS_MD5_C)
94 extern const mbedtls_md_info_t mbedtls_md5_info;
95 #endif
96 #if defined(MBEDTLS_RIPEMD160_C)
97 extern const mbedtls_md_info_t mbedtls_ripemd160_info;
98 #endif
99 #if defined(MBEDTLS_SHA1_C)
100 extern const mbedtls_md_info_t mbedtls_sha1_info;
101 #endif
102 #if defined(MBEDTLS_SHA256_C)
105 #endif
106 #if defined(MBEDTLS_SHA512_C)
107 extern const mbedtls_md_info_t mbedtls_sha384_info;
108 extern const mbedtls_md_info_t mbedtls_sha512_info;
109 #endif
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif /* MBEDTLS_MD_WRAP_H */
const mbedtls_md_info_t mbedtls_sha256_info
Definition: md_wrap.c:472
int size
Definition: md_internal.h:56
void(* clone_func)(void *dst, const void *src)
Definition: md_internal.h:81
int(* finish_func)(void *ctx, unsigned char *output)
Definition: md_internal.h:68
Configuration options (set of defines)
const char * name
Definition: md_internal.h:53
const mbedtls_md_info_t mbedtls_sha224_info
Definition: md_wrap.c:446
void(* ctx_free_func)(void *ctx)
Definition: md_internal.h:78
int(* process_func)(void *ctx, const unsigned char *input)
Definition: md_internal.h:84
int(* digest_func)(const unsigned char *input, size_t ilen, unsigned char *output)
Definition: md_internal.h:71
int(* update_func)(void *ctx, const unsigned char *input, size_t ilen)
Definition: md_internal.h:65
This file contains the generic message-digest wrapper.
Definition: md_internal.h:47
mbedtls_md_type_t
Supported message digests.
Definition: md.h:58
int block_size
Definition: md_internal.h:59
int(* starts_func)(void *ctx)
Definition: md_internal.h:62
mbedtls_md_type_t type
Definition: md_internal.h:50