11 #ifndef CTR_NAND_CRYPTO_INTERFACE_H_ 12 #define CTR_NAND_CRYPTO_INTERFACE_H_ 15 #include "sdmmc/sdmmc.h" 26 } ctr_nand_crypto_type;
137 #endif//CTR_NAND_CRYPTO_INTERFACE_H_ int ctr_nand_crypto_interface_write_sector(void *io, const void *buffer, size_t buffer_size, size_t sector)
Writes sectors from the given io interface.
int ctr_nand_crypto_interface_initialize(ctr_nand_crypto_interface *io, uint8_t key_slot, ctr_nand_crypto_type crypto_type, ctr_io_interface *lower_io)
Initialize the given NAND crypto io interface object.
int ctr_nand_crypto_interface_read(void *io, void *buffer, size_t buffer_size, uint64_t position, size_t count)
Reads bytes from the given io interface.
size_t ctr_nand_crypto_interface_sector_size(void *io)
Returns the size of the sectors used by the underlying io interface.
int ctr_nand_crypto_interface_read_sector(void *io, void *buffer, size_t buffer_size, size_t sector, size_t count)
Reads sectors from the given io interface.
uint64_t ctr_nand_crypto_interface_disk_size(void *io)
Returns the size of the underlying disk for the given io interface.
Filter io interface to apply encryption while reading NAND.
Definition: ctr_nand_crypto_interface.h:30
Virtual table for io interface dispatching.
Definition: ctr_io_interface.h:89
int ctr_nand_crypto_interface_write(void *io, const void *buffer, size_t buffer_size, uint64_t position)
Writes bytes to the given io interface.
void ctr_nand_crypto_interface_destroy(ctr_nand_crypto_interface *io)
Destroys the given NAND crypto io interface object.