RetroArch
padlock.h
Go to the documentation of this file.
1 
24 #ifndef MBEDTLS_PADLOCK_H
25 #define MBEDTLS_PADLOCK_H
26 
27 #include "aes.h"
28 
29 #define MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED -0x0030
31 #if defined(__has_feature)
32 #if __has_feature(address_sanitizer)
33 #define MBEDTLS_HAVE_ASAN
34 #endif
35 #endif
36 
37 /* Some versions of ASan result in errors about not enough registers */
38 #if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && defined(__i386__) && \
39  !defined(MBEDTLS_HAVE_ASAN)
40 
41 #ifndef MBEDTLS_HAVE_X86
42 #define MBEDTLS_HAVE_X86
43 #endif
44 
45 #include <stdint.h>
46 
47 #define MBEDTLS_PADLOCK_RNG 0x000C
48 #define MBEDTLS_PADLOCK_ACE 0x00C0
49 #define MBEDTLS_PADLOCK_PHE 0x0C00
50 #define MBEDTLS_PADLOCK_PMM 0x3000
51 
52 #define MBEDTLS_PADLOCK_ALIGN16(x) (uint32_t *) (16 + ((int32_t) x & ~15))
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
65 int mbedtls_padlock_has_support( int feature );
66 
77 int mbedtls_padlock_xcryptecb( mbedtls_aes_context *ctx,
78  int mode,
79  const unsigned char input[16],
80  unsigned char output[16] );
81 
94 int mbedtls_padlock_xcryptcbc( mbedtls_aes_context *ctx,
95  int mode,
96  size_t length,
97  unsigned char iv[16],
98  const unsigned char *input,
99  unsigned char *output );
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif /* HAVE_X86 */
106 
107 #endif /* padlock.h */
GLenum mode
Definition: glext.h:6857
AES block cipher.
GLenum GLenum GLenum input
Definition: glext.h:9938
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
static const unsigned char iv[]
Definition: ccm.c:364
std::string output
Definition: Config.FromFile.cpp:44
AES context structure.
Definition: aes.h:62
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233