blob: e686d1e2fe28373d92d3efacfb621fd89b69228e [file] [log] [blame]
Jeff Thompson86aea882012-09-29 17:32:48 -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>
7 <title>NDN Interest Matches Name</title>
8
9 <script type="text/javascript" src="../java_socket_bridge.js"></script>
10
Jeff Thompsonc3164722012-09-30 18:35:02 -070011 <script type="text/javascript" src="../util/CCNProtocolDTags.js"></script>
Jeff Thompson86aea882012-09-29 17:32:48 -070012
Jeff Thompsonc3164722012-09-30 18:35:02 -070013 <script type="text/javascript" src="../util/CCNTime.js"></script>
Jeff Thompson86aea882012-09-29 17:32:48 -070014
Jeff Thompsonf3bd3592012-09-29 23:25:30 -070015 <script type="text/javascript" src="../Name.js"></script>
Jeff Thompson86aea882012-09-29 17:32:48 -070016
17 <script type="text/javascript" src="../ContentObject.js"></script>
18
Jeff Thompsonc3164722012-09-30 18:35:02 -070019 <script type="text/javascript" src="../encoding/DateFormat.js"></script>
Jeff Thompson86aea882012-09-29 17:32:48 -070020
Jeff Thompson86aea882012-09-29 17:32:48 -070021 <script type="text/javascript" src="../Interest.js"></script>
22
Jeff Thompsonc3164722012-09-30 18:35:02 -070023 <script type="text/javascript" src="../Key.js"></script>
Jeff Thompson86aea882012-09-29 17:32:48 -070024
Jeff Thompson86aea882012-09-29 17:32:48 -070025 <script type="text/javascript" src="../PublisherID.js"></script>
26
Jeff Thompson86aea882012-09-29 17:32:48 -070027 <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
35 <script type="text/javascript" src="../encoding/BinaryXMLCodec.js"></script>
36
37 <script type="text/javascript" src="../encoding/BinaryXMLDecoder.js"></script>
38
39 <script type="text/javascript" src="../encoding/DataUtils.js"></script>
40
41 <script type="text/javascript" src="../encoding/EncodingUtils.js"></script>
42
43 <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
44
45 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn.js"></script>
46 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn2.js"></script>
47 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa.js"></script>
48 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa2.js"></script>
49
50 <script language="JavaScript" type="text/javascript" src="../securityLib/sha1.js"></script>
51 <script language="JavaScript" type="text/javascript" src="../securityLib/sha256.js"></script>
52 <script language="JavaScript" type="text/javascript" src="../securityLib/sha512.js"></script>
53 <script language="JavaScript" type="text/javascript" src="../securityLib/md5.js"></script>
54 <script language="JavaScript" type="text/javascript" src="../securityLib/ripemd160.js"></script>
55 <script language="JavaScript" type="text/javascript" src="../securityLib/base64.js"></script>
56
57 <script language="JavaScript" type="text/javascript" src="../securityLib/rsapem-1.1.js"></script>
58 <script language="JavaScript" type="text/javascript" src="../securityLib/rsasign-1.2.js"></script>
59 <script language="JavaScript" type="text/javascript" src="../securityLib/asn1hex-1.1.js"></script>
60 <script language="JavaScript" type="text/javascript" src="../securityLib/x509-1.1.js"></script>
61
62 <script type="text/javascript">
63
64 function check(){
Jeff Thompsonf3bd3592012-09-29 23:25:30 -070065 var interest = new Interest( new Name(document.getElementById('interest').value));
Jeff Thompson86aea882012-09-29 17:32:48 -070066 interest.scope = 1;
67
Jeff Thompsonf3bd3592012-09-29 23:25:30 -070068 var nameToCheck = new Name(document.getElementById('nameToCheck').value);
Jeff Thompson86aea882012-09-29 17:32:48 -070069
70 var output = (interest.matches_name(nameToCheck) ? "matches" : "doesn't match");
71 document.getElementById('result').innerHTML = output;
72 }
73
74 </script>
75
76</head>
77<body >
78 <form>
79
80 Please enter the name of an interest:<br />
81 <input id="interest" type="text" name="INTEREST" value="/ndn/ucla.edu" /> <br/>
82
83 Please enter a name to check if the interest matches the name:<br />
84 <input id="nameToCheck" type="text" name="NAME_TO_CHECK" value="/ndn/ucla.edu" /> <br/>
85
86 </form>
87 <button onclick="check()">Check</button>
88
89 <p id="result"></p>
90
91</body>
92</html>