From fd33ef84967c7aa65d8412f669830bef29b1cf1c Mon Sep 17 00:00:00 2001 From: Aurora Date: Tue, 20 Sep 2016 14:19:33 +0200 Subject: [PATCH] Const-ify --- source/crypto.c | 4 ++-- source/crypto.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/crypto.c b/source/crypto.c index 3a49f4d..5a4b49e 100755 --- a/source/crypto.c +++ b/source/crypto.c @@ -377,7 +377,7 @@ void decryptExeFs(u8 *inbuf) aes(inbuf - 0x200, exeFsOffset, exeFsSize / AES_BLOCK_SIZE, ncchCtr, AES_CTR_MODE, AES_INPUT_BE | AES_INPUT_NORMAL); } -void decryptNusFirm(u8 *inbuf, u8 *outbuf, u32 ncchSize) +void decryptNusFirm(const u8 *inbuf, u8 *outbuf, u32 ncchSize) { const u8 keyY0x3D[AES_BLOCK_SIZE] = {0x0C, 0x76, 0x72, 0x30, 0xF0, 0x99, 0x8F, 0x1C, 0x46, 0x82, 0x82, 0x02, 0xFA, 0xAC, 0xBE, 0x4C}; u8 __attribute__((aligned(4))) cetkIv[AES_BLOCK_SIZE] = {0}; @@ -477,7 +477,7 @@ void arm9Loader(u8 *arm9Section) } } -void computePinHash(u8 *out, u8 *in) +void computePinHash(u8 *outbuf, const u8 *inbuf) { u8 __attribute__((aligned(4))) cid[AES_BLOCK_SIZE]; u8 __attribute__((aligned(4))) cipherText[AES_BLOCK_SIZE]; diff --git a/source/crypto.h b/source/crypto.h index e1196a8..86a8249 100755 --- a/source/crypto.h +++ b/source/crypto.h @@ -109,6 +109,6 @@ void ctrNandInit(void); u32 ctrNandRead(u32 sector, u32 sectorCount, u8 *outbuf); void set6x7xKeys(void); void decryptExeFs(u8 *inbuf); -void decryptNusFirm(u8 *inbuf, u8 *outbuf, u32 ncchSize); +void decryptNusFirm(const u8 *inbuf, u8 *outbuf, u32 ncchSize); void arm9Loader(u8 *arm9Section); -void computePinHash(u8 *out, u8 *in); \ No newline at end of file +void computePinHash(u8 *outbuf, const u8 *inbuf); \ No newline at end of file