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