adler32 checksum in javascript



<!DOCTYPE html>
<div>Expected value: <b>1802963080</b></div>
<div>Actual value: <b id=“ret”></b></div>
  var adler32 = function(a,b,c,d,e,f){for(b=65521,c=1,d=e=0;f=a.charCodeAt(e++);d=(d+c)%b)c=(c+f)%b;return(d<<16)|c}
  document.getElementById( “ret” ).innerHTML = adler32(“ is totally rad!”)
  “name”: “adler32”,
  “description”: “a javascript port of wikipedia’s example C implementation of Adler32”,
  “keywords”: [

This entry was posted in Code Snippets and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s