From 7067c6d0e889c0ba4a043d354c9b9056476d3c31 Mon Sep 17 00:00:00 2001 From: Aurora Date: Tue, 22 Nov 2016 22:50:40 +0100 Subject: [PATCH] Clearer this way --- source/crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/crypto.c b/source/crypto.c index 0d9ebe5..5e58cf9 100755 --- a/source/crypto.c +++ b/source/crypto.c @@ -381,15 +381,15 @@ void generateSector(u8 *keySector, u32 mode) //Inject key2 switch(mode) { + case 0: + memcpy(keySector + AES_BLOCK_SIZE, !ISDEVUNIT ? key2s[1] : devKey2s[1], AES_BLOCK_SIZE); + break; case 1: memcpy(keySector + AES_BLOCK_SIZE, keySector, AES_BLOCK_SIZE); return; case 2: memcpy(keySector + AES_BLOCK_SIZE, !ISDEVUNIT ? key2s[0] : devKey2s[0], AES_BLOCK_SIZE); break; - default: - memcpy(keySector + AES_BLOCK_SIZE, !ISDEVUNIT ? key2s[1] : devKey2s[1], AES_BLOCK_SIZE); - break; } //Encrypt key sector