Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 1 | <?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>
|
| 7 | <title>NDN Interest Matches Name</title>
|
| 8 |
|
| 9 | <script type="text/javascript" src="../java_socket_bridge.js"></script>
|
| 10 |
|
Jeff Thompson | c316472 | 2012-09-30 18:35:02 -0700 | [diff] [blame] | 11 | <script type="text/javascript" src="../util/CCNProtocolDTags.js"></script>
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 12 |
|
Jeff Thompson | c316472 | 2012-09-30 18:35:02 -0700 | [diff] [blame] | 13 | <script type="text/javascript" src="../util/CCNTime.js"></script>
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 14 |
|
Jeff Thompson | f3bd359 | 2012-09-29 23:25:30 -0700 | [diff] [blame] | 15 | <script type="text/javascript" src="../Name.js"></script>
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 16 |
|
| 17 | <script type="text/javascript" src="../ContentObject.js"></script>
|
| 18 |
|
Jeff Thompson | c316472 | 2012-09-30 18:35:02 -0700 | [diff] [blame] | 19 | <script type="text/javascript" src="../encoding/DateFormat.js"></script>
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 20 |
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 21 | <script type="text/javascript" src="../Interest.js"></script>
|
| 22 |
|
Jeff Thompson | c316472 | 2012-09-30 18:35:02 -0700 | [diff] [blame] | 23 | <script type="text/javascript" src="../Key.js"></script>
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 24 |
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 25 | <script type="text/javascript" src="../PublisherID.js"></script>
|
| 26 |
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 27 | <script type="text/javascript" src="../PublisherPublicKeyDigest.js"></script>
|
| 28 |
|
| 29 | <script type="text/javascript" src="../FaceInstance.js"></script>
|
| 30 |
|
| 31 | <script type="text/javascript" src="../ForwardingEntry.js"></script>
|
| 32 |
|
| 33 | <script type="text/javascript" src="../encoding/BinaryXMLEncoder.js"></script>
|
| 34 |
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 35 | <script type="text/javascript" src="../encoding/BinaryXMLDecoder.js"></script>
|
| 36 |
|
| 37 | <script type="text/javascript" src="../encoding/DataUtils.js"></script>
|
| 38 |
|
| 39 | <script type="text/javascript" src="../encoding/EncodingUtils.js"></script>
|
| 40 |
|
| 41 | <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
|
| 42 |
|
| 43 | <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn.js"></script>
|
| 44 | <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn2.js"></script>
|
| 45 | <script language="JavaScript" type="text/javascript" src="../securityLib/rsa.js"></script>
|
| 46 | <script language="JavaScript" type="text/javascript" src="../securityLib/rsa2.js"></script>
|
| 47 |
|
| 48 | <script language="JavaScript" type="text/javascript" src="../securityLib/sha1.js"></script>
|
| 49 | <script language="JavaScript" type="text/javascript" src="../securityLib/sha256.js"></script>
|
| 50 | <script language="JavaScript" type="text/javascript" src="../securityLib/sha512.js"></script>
|
| 51 | <script language="JavaScript" type="text/javascript" src="../securityLib/md5.js"></script>
|
| 52 | <script language="JavaScript" type="text/javascript" src="../securityLib/ripemd160.js"></script>
|
| 53 | <script language="JavaScript" type="text/javascript" src="../securityLib/base64.js"></script>
|
| 54 |
|
| 55 | <script language="JavaScript" type="text/javascript" src="../securityLib/rsapem-1.1.js"></script>
|
| 56 | <script language="JavaScript" type="text/javascript" src="../securityLib/rsasign-1.2.js"></script>
|
| 57 | <script language="JavaScript" type="text/javascript" src="../securityLib/asn1hex-1.1.js"></script>
|
| 58 | <script language="JavaScript" type="text/javascript" src="../securityLib/x509-1.1.js"></script>
|
| 59 |
|
| 60 | <script type="text/javascript">
|
| 61 |
|
| 62 | function check(){
|
Jeff Thompson | f3bd359 | 2012-09-29 23:25:30 -0700 | [diff] [blame] | 63 | var interest = new Interest( new Name(document.getElementById('interest').value));
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 64 | interest.scope = 1;
|
| 65 |
|
Jeff Thompson | f3bd359 | 2012-09-29 23:25:30 -0700 | [diff] [blame] | 66 | var nameToCheck = new Name(document.getElementById('nameToCheck').value);
|
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 67 |
|
| 68 | var output = (interest.matches_name(nameToCheck) ? "matches" : "doesn't match");
|
| 69 | document.getElementById('result').innerHTML = output;
|
| 70 | }
|
| 71 |
|
| 72 | </script>
|
| 73 |
|
| 74 | </head>
|
| 75 | <body >
|
| 76 | <form>
|
| 77 |
|
| 78 | Please enter the name of an interest:<br />
|
| 79 | <input id="interest" type="text" name="INTEREST" value="/ndn/ucla.edu" /> <br/>
|
| 80 |
|
| 81 | Please enter a name to check if the interest matches the name:<br />
|
| 82 | <input id="nameToCheck" type="text" name="NAME_TO_CHECK" value="/ndn/ucla.edu" /> <br/>
|
| 83 |
|
| 84 | </form>
|
| 85 | <button onclick="check()">Check</button>
|
| 86 |
|
| 87 | <p id="result"></p>
|
| 88 |
|
| 89 | </body>
|
| 90 | </html>
|