Spring 2017 Exam 6

Student starter for Adler 32

by Ron Eaglin

HTML

<input type="textbox" value="COP3530" id="input" />
<input type="button" value="Click to Calculate" onclick="doAdler()" />

JavaScript

function doAdler(){
  t = document.getElementById('input').value;
  alert(adler32(t));
}

function adler32(s){
  var MOD_ADLER = 65521;

  var a = 1;
  var b = 0;

// This would be the part you write
// You may want to start with https://en.wikipedia.org/wiki/Adler-32 
// You will need to use the charCodeAt  
  // Process each byte of the data in order 
  

}