mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 00:32:49 +00:00
(mbedtls) Add arc4_alt.h
This commit is contained in:
parent
01103dcd23
commit
5b3b3b4a89
5
deps/mbedtls/aes.c
vendored
5
deps/mbedtls/aes.c
vendored
@ -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
5
deps/mbedtls/arc4.c
vendored
@ -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
9
deps/mbedtls/arc4_alt.h
vendored
Normal 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
|
Loading…
x
Reference in New Issue
Block a user