1
0
Fork 0
mirror of https://github.com/marcrobledo/RomPatcher.js.git synced 2025-06-27 16:25:54 +00:00

fixed MD5 hashing with >512MB files, ignore txt, readmes,etc files in zips, multiple predefined patches is now a dropdown, allowing user to choose and change patch without having to refresh the app

This commit is contained in:
Marc Robledo 2021-09-20 08:47:26 +02:00
parent bcc714f179
commit 458d7297e4
7 changed files with 366 additions and 251 deletions

View file

@ -1,4 +1,4 @@
/* Rom Patcher JS - CRC32/MD5/SHA-1/checksums calculators v20200926 - Marc Robledo 2016-2020 - http://www.marcrobledo.com/license */
/* Rom Patcher JS - CRC32/MD5/SHA-1/checksums calculators v20210815 - Marc Robledo 2016-2021 - http://www.marcrobledo.com/license */
function padZeroes(intVal, nBytes){
var hexString=intVal.toString(16);
@ -53,6 +53,7 @@ function md5(marcFile, headerSize){
for(i=0;i<16;i++)tail[i]=0;
}
tail[14]=n*8;
tail[15]=Math.floor(n/536870912) >>> 0; //if file is bigger than 512Mb*8, value is bigger than 32 bits, so it needs two words to store its length
_md5cycle(state,tail);
for(var i=0;i<state.length;i++){