Example program to test AES-GCM functionality. Used for a workshop

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers memory.h Source File

memory.h

Go to the documentation of this file.
00001 /**
00002  * \file memory.h
00003  *
00004  * \brief Memory allocation layer (Deprecated to platform layer)
00005  *
00006  *  Copyright (C) 2006-2014, Brainspark B.V.
00007  *
00008  *  This file is part of PolarSSL (http://www.polarssl.org)
00009  *  Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
00010  *
00011  *  All rights reserved.
00012  *
00013  *  This program is free software; you can redistribute it and/or modify
00014  *  it under the terms of the GNU General Public License as published by
00015  *  the Free Software Foundation; either version 2 of the License, or
00016  *  (at your option) any later version.
00017  *
00018  *  This program is distributed in the hope that it will be useful,
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *  GNU General Public License for more details.
00022  *
00023  *  You should have received a copy of the GNU General Public License along
00024  *  with this program; if not, write to the Free Software Foundation, Inc.,
00025  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00026  */
00027 #ifndef POLARSSL_MEMORY_H
00028 #define POLARSSL_MEMORY_H
00029 
00030 #if !defined(POLARSSL_CONFIG_FILE)
00031 #include "config.h"
00032 #else
00033 #include POLARSSL_CONFIG_FILE
00034 #endif
00035 
00036 #include <stdlib.h>
00037 
00038 #if defined(POLARSSL_MEMORY_C) && !defined(POLARSSL_PLATFORM_MEMORY)
00039 #define POLARSSL_PLATFORM_MEMORY
00040 #endif
00041 
00042 #include "platform.h"
00043 #include "memory_buffer_alloc.h"
00044 
00045 int memory_set_own( void * (*malloc_func)( size_t ),
00046                     void (*free_func)( void * ) )
00047 {
00048     return platform_set_malloc_free( malloc_func, free_func );
00049 }
00050 
00051 
00052 #endif /* memory.h */
00053 
00054