blob: 09987c1c0093693a7817ea12530d8aa218de3a96 [file] [log] [blame]
Meki Cherkaoui88d59cd2012-05-14 07:34:58 -07001<?xml version = "1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3"DTD/xhtml1-strict.dtd">
4<html xmlns = "http://www.w3.org/1999/xhtml">
5
6<head>
Jeff Thompson8ecc0762012-08-18 17:09:11 -07007 <title>Test SHA-256</title>
Jeff Thompson38422f42012-11-15 00:20:39 -08008
9 <script type="text/javascript" src="../Helper.js"></script>
Meki Cherkaoui88d59cd2012-05-14 07:34:58 -070010
Meki Cherkaoui8f173612012-06-06 01:05:40 -070011 <script src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/sha256.js"></script>
12
13
Meki Cherkaoui88d59cd2012-05-14 07:34:58 -070014 <script type="text/javascript">
15 function hash(){
16
17 var input = document.getElementById('contentname').value;
18
Meki Cherkaoui8f173612012-06-06 01:05:40 -070019 var output = "TEST1 "+hex_sha256(input);
20
21 output+= "<br />";
22
jeff6c388572012-09-02 15:30:17 -070023 output += "reference " +CryptoJS.SHA256(input);
Meki Cherkaoui88d59cd2012-05-14 07:34:58 -070024
25 document.getElementById('result').innerHTML = output;
26
27 }
28
29 </script>
30
31
32</head>
33<body >
34 <form>
35
36
37
Jeff Thompson8ecc0762012-08-18 17:09:11 -070038 Please Enter Text to Hash:<br /><input id="contentname" type="text" name="CONTENTNAME" value="/PARC/abc" /> <br />
Meki Cherkaoui88d59cd2012-05-14 07:34:58 -070039
40 </form>
41 <button onclick="hash()">Hash</button>
42
43 <p id="result"></p>
44
45</body>
jeff6c388572012-09-02 15:30:17 -070046</html>