mirror of
https://github.com/rvtr/unlaunch-installer_dev.git
synced 2026-01-26 13:43:08 -05:00
Address warnings in arm9
This commit is contained in:
parent
54e6c23277
commit
f1d6f13ff2
@ -69,8 +69,11 @@ void getConsoleID(u8 *consoleID)
|
|||||||
u8 key_x[16];////key3_x - contains a DSi console id (which just happens to be the LFCS on 3ds)
|
u8 key_x[16];////key3_x - contains a DSi console id (which just happens to be the LFCS on 3ds)
|
||||||
|
|
||||||
u8 empty_buff[8] = {0};
|
u8 empty_buff[8] = {0};
|
||||||
|
//receive the goods from arm7
|
||||||
memcpy(key, fifo, 16); //receive the goods from arm7
|
for(size_t i = 0; i < 16; ++i)
|
||||||
|
{
|
||||||
|
key[i] = fifo[i];
|
||||||
|
}
|
||||||
|
|
||||||
if(memcmp(key + 8, empty_buff, 8) == 0)
|
if(memcmp(key + 8, empty_buff, 8) == 0)
|
||||||
{
|
{
|
||||||
@ -204,7 +207,7 @@ bool nandio_write_nocash_footer(NocashFooter* footer)
|
|||||||
// len is guaranteed <= CRYPT_BUF_LEN
|
// len is guaranteed <= CRYPT_BUF_LEN
|
||||||
static bool write_sectors(sec_t start, sec_t len, const void *buffer)
|
static bool write_sectors(sec_t start, sec_t len, const void *buffer)
|
||||||
{
|
{
|
||||||
static u8 writeCopy[SECTOR_SIZE*16];
|
static u8 writeCopy[SECTOR_SIZE*CRYPT_BUF_LEN];
|
||||||
memcpy(writeCopy, buffer, len * SECTOR_SIZE);
|
memcpy(writeCopy, buffer, len * SECTOR_SIZE);
|
||||||
|
|
||||||
dsi_nand_crypt(crypt_buf, writeCopy, start * SECTOR_SIZE / AES_BLOCK_SIZE, len * SECTOR_SIZE / AES_BLOCK_SIZE);
|
dsi_nand_crypt(crypt_buf, writeCopy, start * SECTOR_SIZE / AES_BLOCK_SIZE, len * SECTOR_SIZE / AES_BLOCK_SIZE);
|
||||||
|
|||||||
@ -53,7 +53,7 @@ void dsi_set_ctr(dsi_context* ctx, const unsigned char ctr[16])
|
|||||||
ctx->ctr[i] = ctr[15-i];
|
ctx->ctr[i] = ctr[15-i];
|
||||||
}
|
}
|
||||||
|
|
||||||
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[12])
|
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[16])
|
||||||
{
|
{
|
||||||
dsi_set_key(ctx, key);
|
dsi_set_key(ctx, key);
|
||||||
dsi_set_ctr(ctx, ctr);
|
dsi_set_ctr(ctx, ctr);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ void dsi_add_ctr(dsi_context* ctx, unsigned int carry);
|
|||||||
|
|
||||||
void dsi_set_ctr(dsi_context* ctx, const unsigned char ctr[16]);
|
void dsi_set_ctr(dsi_context* ctx, const unsigned char ctr[16]);
|
||||||
|
|
||||||
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[12]);
|
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[16]);
|
||||||
|
|
||||||
void dsi_crypt_ctr(dsi_context* ctx, const void* in, void* out, unsigned int len);
|
void dsi_crypt_ctr(dsi_context* ctx, const void* in, void* out, unsigned int len);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user