(mbedtls) Add arc4_alt.h

This commit is contained in:
twinaphex 2018-08-04 20:09:07 +02:00
parent 01103dcd23
commit 5b3b3b4a89
3 changed files with 11 additions and 8 deletions

5
deps/mbedtls/aes.c vendored
View File

@ -54,10 +54,7 @@
#if !defined(MBEDTLS_AES_ALT)
/* Implementation that should never be optimized out by the compiler */
static void mbedtls_zeroize( void *v, size_t n ) {
volatile unsigned char *p = (unsigned char*)v; while( n-- ) *p++ = 0;
}
#include "arc4_alt.h"
/*
* 32-bit integer manipulation macros (little endian)

5
deps/mbedtls/arc4.c vendored
View File

@ -47,10 +47,7 @@
#if !defined(MBEDTLS_ARC4_ALT)
/* Implementation that should never be optimized out by the compiler */
static void mbedtls_zeroize( void *v, size_t n ) {
volatile unsigned char *p = (unsigned char*)v; while( n-- ) *p++ = 0;
}
#include "arc4_alt.h"
void mbedtls_arc4_init( mbedtls_arc4_context *ctx )
{

9
deps/mbedtls/arc4_alt.h vendored Normal file
View File

@ -0,0 +1,9 @@
#ifndef _ARC4_ALT_H
#define _ARC4_ALT_H
/* Implementation that should never be optimized out by the compiler */
static void mbedtls_zeroize( void *v, size_t n ) {
volatile unsigned char *p = (unsigned char*)v; while( n-- ) *p++ = 0;
}
#endif