[ctrtool] Improved efficiency of aes-ctr operations.

This commit is contained in:
jakcron
2016-06-14 20:35:05 +08:00
parent de5c4e1b2a
commit 01cd4cba7b
8 changed files with 96 additions and 44 deletions
+2 -1
View File
@@ -135,7 +135,8 @@ int ncch_extract_prepare(ncch_context* ctx, u32 type, u32 flags)
ctx->extractflags = flags;
fseeko64(ctx->file, offset, SEEK_SET);
ncch_get_counter(ctx, counter, type);
ctr_init_counter(&ctx->aes, ctx->key, counter);
ctr_init_key(&ctx->aes, ctx->key);
ctr_init_counter(&ctx->aes, counter);
return 1;