#ifndef AES_H # define AES_H #include struct cryptodev_ctx { int cfd; struct session_op sess; uint16_t alignmask; }; #define AES_BLOCK_SIZE 16 int aes_ctx_init(struct cryptodev_ctx* ctx, int cfd, const uint8_t *key, unsigned int key_size); void aes_ctx_deinit(); int aes_encrypt(struct cryptodev_ctx* ctx, const void* iv, const void* plaintext, void* ciphertext, size_t size); int aes_decrypt(struct cryptodev_ctx* ctx, const void* iv, const void* ciphertext, void* plaintext, size_t size); #endif