mirror of
https://github.com/Elpisdev/unsegaREBORN.git
synced 2026-09-22 22:28:11 +03:00
21 lines
567 B
C
21 lines
567 B
C
#ifndef AES_H
|
|
#define AES_H
|
|
|
|
#include "lib.h"
|
|
|
|
#define AES_BLOCKLEN 16
|
|
|
|
typedef struct {
|
|
uint8_t round_keys[176] __attribute__((aligned(16)));
|
|
uint8_t dec_keys[160] __attribute__((aligned(16)));
|
|
uint8_t iv[16] __attribute__((aligned(16)));
|
|
} AES_ctx;
|
|
|
|
void AES_init_ctx_iv(AES_ctx* ctx, const uint8_t* key, const uint8_t* iv);
|
|
void AES_ctx_set_iv(AES_ctx* ctx, const uint8_t* iv);
|
|
void AES_CBC_decrypt_buffer(AES_ctx* ctx, uint8_t* buf, size_t len);
|
|
void AES_CBC_encrypt_buffer(AES_ctx* ctx, uint8_t* buf, size_t len);
|
|
int aes_hw_supported(void);
|
|
|
|
#endif
|