123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef AXTLS_OS_PORT_H
- #define AXTLS_OS_PORT_H
-
-
-
- #include <stdint.h>
- #include <byteswap.h>
-
-
- FILE_LICENCE ( BSD3 );
-
-
- #define abort() assert ( 0 )
-
-
- #define alloca( size ) __builtin_alloca ( size )
-
- #include <ipxe/random_nz.h>
- static inline void get_random_NZ ( int num_rand_bytes, uint8_t *rand_data ) {
-
-
- get_random_nz ( rand_data, num_rand_bytes );
- }
-
-
- #define aes 1
- #if OBJECT
-
- struct aes_key_st;
-
- static void AES_encrypt ( const struct aes_key_st *ctx, uint32_t *data );
- static void AES_decrypt ( const struct aes_key_st *ctx, uint32_t *data );
-
- void axtls_aes_encrypt ( void *ctx, uint32_t *data ) {
- AES_encrypt ( ctx, data );
- }
-
- void axtls_aes_decrypt ( void *ctx, uint32_t *data ) {
- AES_decrypt ( ctx, data );
- }
-
- #endif
- #undef aes
-
- #endif
|