NxTIC/subDir/public_html/js/lib/min/crc32.js

2 lines
284 B
JavaScript
Raw Permalink Normal View History

var makeCRCTable=function(){for(var a,d=[],b=0;256>b;b++){a=b;for(var c=0;8>c;c++)a=a&1?3988292384^a>>>1:a>>>1;d[b]=a}return d},crc32=function(a){for(var d=window.crcTable||(window.crcTable=makeCRCTable()),b=-1,c=0;c<a.length;c++)b=b>>>8^d[(b^a.charCodeAt(c))&255];return(b^-1)>>>0};