Skip to content

Commit

Permalink
crypto: allow data to be passed that is larger than msg block
Browse files Browse the repository at this point in the history
the sha_executeCommand will break it up in chunks for processing anyway
  • Loading branch information
DacoTaco committed Nov 25, 2024
1 parent 385bb95 commit 4b1feda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libogc/sha.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ s32 SHA_Input(sha_context* context, const void* data, const u32 data_size)
if(context == NULL || data == NULL || data_size == 0)
return -1;

if((((u32)context) & 0x1F) || (((u32)data) & 0x3F) || (data_size & ~(SHA_MSGBLOCK_SIZE-1)) != 0)
if((((u32)context) & 0x1F) || (((u32)data) & 0x3F))
return -4;

return SHA_ExecuteCommand(AddData, context, data, data_size, NULL);
Expand Down

0 comments on commit 4b1feda

Please sign in to comment.