blob: 61b1b76c0d67c99121e758a2cc2455ad595bb48e [file] [log] [blame]
Andres Amaya Garcia614d9c02017-10-24 21:27:43 +01001/**
2 * \file utils.h
3 *
4 * \brief mbed TLS utility functions
5 *
6 * Copyright (C) 2017, ARM Limited, All Rights Reserved
7 * SPDX-License-Identifier: Apache-2.0
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License"); you may
10 * not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *
21 * This file is part of mbed TLS (https://tls.mbed.org)
22 */
23#ifndef MBEDTLS_UTILS_H
24#define MBEDTLS_UTILS_H
25
26#include <stddef.h>
27
28/**
29 * \brief Securely zeroize a buffer
30 *
31 * \param buf Buffer to be zeroized
32 * \param len Length of the buffer in bytes
33 *
34 * \note This implementation should never be optimized out by the
35 * compiler
36 */
37void mbedtls_zeroize( void *buf, size_t len );
38
39#endif /* MBEDTLS_UTILS_H */