aboutsummaryrefslogtreecommitdiff
path: root/src/libtomcrypt/src/misc/crypt_libc.c
blob: bcc89f4f94d1aa86c4662040b6c03a70c3c1a427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*****************************************************************************/
/* crypt_libc.c                           Copyright (c) Ladislav Zezula 2010 */
/*---------------------------------------------------------------------------*/
/* Description:                                                              */
/*---------------------------------------------------------------------------*/
/*   Date    Ver   Who  Comment                                              */
/* --------  ----  ---  -------                                              */
/* 05.05.10  1.00  Lad  The first version of crypt_libc.c                    */
/*****************************************************************************/

// LibTomCrypt header
#include <stdlib.h>
#include "../headers/tomcrypt.h"

void * LibTomMalloc(size_t n)
{
    return malloc(n);
}

void * LibTomCalloc(size_t n, size_t s)
{
    return calloc(n, s);
}

void * LibTomRealloc(void *p, size_t n)
{
    return realloc(p, n);
}

void LibTomFree(void * p)
{
    free(p);
}

clock_t LibTomClock(void)
{
    return clock();
}

void LibTomQsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *))
{
    qsort(base, nmemb, size, compar);
}