Closed bradleycha closed 2 weeks ago
This IO subsystem could be called "mappers". For example, "CliAuthIoFileMapper", "CliAuthIoAes256Mapper", etc. Bytes could be read like "cliauth_io_mapper_read(const CliAuthIoMapper context, CliAuthUInt8 output [], CliAuthUInt32 bytes, CliAuthUInt32 offset)", and written like "cliauth_io_mapper_write(const CliAuthIoMapper context, const CliAuthUInt8 data [], CliAuthUInt32 bytes, CliAuthUInt32 offset)".
Resolved with 2f8c0af
Currently, it's impossible to read or write arbitrary bytes using IO streams. Once a byte is read or written, the stream cannot be re-winded, and it's not possible to skip an arbitrary number of bytes. This will be a requirement for future encryption to function. A new interface should be added alongside the existing stream interface to support random access for both reading and writing.