Simple hash example

See http://tweakers.net/nieuws/110731/miljoenen-accountgegevens-van-minecraft-community-lifeboat-zijn-buitgemaakt.html?showReaction=8485643#r_8485643

by Rob Janssen

HTML

<input type="text" id="password" value="Secret01" onkeyup="showResult()">
<p id="output"></p>

JavaScript

function showResult() {
    var input = document.getElementById('password').value;
	document.getElementById('output').innerText  = 'Hash: ' + RobIIIHash(input);
}

function RobIIIHash(value) {
   var sum = 0;
   for (var i = 0; i < value.length; i++)
       sum += value.charCodeAt(i);
   return sum % 16;
}

window.onload = showResult();