PolarSSL
|
00001 00025 #ifndef POLARSSL_PADLOCK_H 00026 #define POLARSSL_PADLOCK_H 00027 00028 #include "polarssl/aes.h" 00029 00030 #if defined(POLARSSL_HAVE_ASM) && defined(__GNUC__) && defined(__i386__) 00031 00032 #ifndef POLARSSL_HAVE_X86 00033 #define POLARSSL_HAVE_X86 00034 #endif 00035 00036 #define PADLOCK_RNG 0x000C 00037 #define PADLOCK_ACE 0x00C0 00038 #define PADLOCK_PHE 0x0C00 00039 #define PADLOCK_PMM 0x3000 00040 00041 #define PADLOCK_ALIGN16(x) (unsigned long *) (16 + ((long) x & ~15)) 00042 00043 #define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED -0x08E0 00044 00045 #ifdef __cplusplus 00046 extern "C" { 00047 #endif 00048 00056 int padlock_supports( int feature ); 00057 00068 int padlock_xcryptecb( aes_context *ctx, 00069 int mode, 00070 const unsigned char input[16], 00071 unsigned char output[16] ); 00072 00085 int padlock_xcryptcbc( aes_context *ctx, 00086 int mode, 00087 int length, 00088 unsigned char iv[16], 00089 const unsigned char *input, 00090 unsigned char *output ); 00091 00092 #ifdef __cplusplus 00093 } 00094 #endif 00095 00096 #endif /* HAVE_X86 */ 00097 00098 #endif /* padlock.h */