[ctrtool] Re-added "--seed" option, simplified/corrected common-key selection logic.

This commit is contained in:
jakcron
2017-06-05 11:31:18 +08:00
parent 3cca6a7a93
commit 56ef8b41d1
8 changed files with 111 additions and 91 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ typedef struct
FILE* file;
u64 offset;
u32 size;
u8 titlekey[16];
key128 titlekey;
eticket tik;
ctr_aes_context aes;
settings* usersettings;
@@ -54,10 +54,10 @@ void tik_set_file(tik_context* ctx, FILE* file);
void tik_set_offset(tik_context* ctx, u64 offset);
void tik_set_size(tik_context* ctx, u32 size);
void tik_set_usersettings(tik_context* ctx, settings* usersettings);
void tik_get_titlekey(tik_context* ctx, u8 key[0x10]);
const unsigned char* tik_get_titlekey(tik_context* ctx);
void tik_get_titleid(tik_context* ctx, u8 titleid[8]);
void tik_get_iv(tik_context* ctx, u8 iv[0x10]);
void tik_decrypt_titlekey(tik_context* ctx, u8 decryptedkey[0x10]);
int tik_decrypt_titlekey(tik_context* ctx, u8 decryptedkey[0x10]);
void tik_print(tik_context* ctx);
void tik_process(tik_context* ctx, u32 actions);