blob: f695f088ca7e5bd638456eb250e3f27d410dd9be [file] [log] [blame]
<?xml version = "1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Test SHA-256</title>
<script type="text/javascript" src="../Helper.js"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/sha256.js"></script>
<script type="text/javascript">
function hash(){
var input = document.getElementById('contentname').value;
var output = "TEST1 "+hex_sha256(input);
output+= "<br />";
output += "reference " +CryptoJS.SHA256(input);
document.getElementById('result').innerHTML = output;
}
</script>
</head>
<body >
<form>
Please Enter Text to Hash:<br /><input id="contentname" type="text" name="CONTENTNAME" value="/ndn/abc" /> <br />
</form>
<button onclick="hash()">Hash</button>
<p id="result"></p>
</body>
</html>