blob: 196afbe76a489a67d03f93e88e61ba955029e8e7 [file] [log] [blame]
Meki Cherkaoui8f173612012-06-06 01:05:40 -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 Decode Face Instance</title>
8
Jeff Thompson7ed5ef52012-08-26 11:28:48 -07009 <script type="text/javascript" src="../java_socket_bridge.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070010
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070011 <script type="text/javascript" src="../CCNProtocolDTags.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070012
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070013 <script type="text/javascript" src="../CCNTime.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070014
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070015 <script type="text/javascript" src="../ContentName.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070016
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070017 <script type="text/javascript" src="../ContentObject.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070018
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070019 <script type="text/javascript" src="../DateFormat.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070020
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070021 <script type="text/javascript" src="../Exclude.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070022
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070023 <script type="text/javascript" src="../ExcludeAny.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070024
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070025 <script type="text/javascript" src="../ExcludeComponent.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070026
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070027 <script type="text/javascript" src="../Interest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070028
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070029 <script type="text/javascript" src="../KeyLocator.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070030
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070031 <script type="text/javascript" src="../KeyName.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070032
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070033 <script type="text/javascript" src="../PublisherID.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070034
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070035 <script type="text/javascript" src="../Signature.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070036
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070037 <script type="text/javascript" src="../SignedInfo.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070038
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070039 <script type="text/javascript" src="../PublisherPublicKeyDigest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070040
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070041 <script type="text/javascript" src="../FaceInstance.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070042
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070043 <script type="text/javascript" src="../ForwardingEntry.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070044
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070045 <script type="text/javascript" src="../encoding/BinaryXMLEncoder.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070046
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070047 <script type="text/javascript" src="../encoding/BinaryXMLCodec.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070048
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070049 <script type="text/javascript" src="../encoding/BinaryXMLDecoder.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070050
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070051 <script type="text/javascript" src="../encoding/DataUtils.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070052
jeffdd4602f2012-09-16 16:05:01 -070053 <script type="text/javascript" src="../encoding/EncodingUtils.js"></script>
54
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070055 <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070056
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070057 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070061
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070062 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070068
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070069 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070073
74 <script type="text/javascript">
75
76 function decode(){
77
78 var input = document.getElementById('result').innerHTML;
79
80
81 var faceInstance = decodeHexFaceInstance(input);
82
83 if(LOG>3)console.log('FACE INSTANCE DECODED');
84 if(LOG>3)console.log(faceInstance);
85
86 ///////////////////////////////////////
87
88 var output ="";
89
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070090 if(faceInstance.publisherPublicKeyDigest!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070091 output+= "PublisherPublicKeyDigest: ";
92
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070093 output+= DataUtils.toHex(faceInstance.publisherPublicKeyDigest.publisherPublicKeyDigest);
Meki Cherkaoui8f173612012-06-06 01:05:40 -070094
95 //output+= "PUBLISHER ID TYPE: ";
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070096 //output+= faceInstance.publisherPublicKeyDigest.PublisherPublicKeyDigest;
Meki Cherkaoui8f173612012-06-06 01:05:40 -070097
98 output+= "<br />";
99 output+= "<br />";
100
101 }
102
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700103 if(faceInstance.faceID!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700104 output+= "FaceID: ";
105
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700106 output+= faceInstance.faceID;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700107 output+= "<br />";
108 }
109
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700110 if(faceInstance.ipProto!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700111 output+= "IPProto: ";
112
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700113 output+= faceInstance.ipProto;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700114 output+= "<br />";
115 }
116
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700117 if(faceInstance.host!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700118 output+= "Host: ";
119
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700120 output+= faceInstance.host;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700121 output+= "<br />";
122 }
123
124 if(faceInstance.Port!=null){
125 output+= "Port: ";
126
127 output+= faceInstance.Port;
128 output+= "<br />";
129 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700130 if(faceInstance.freshnessSeconds!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700131 output+= "FreshnessSeconds: ";
132
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700133 output+= faceInstance.freshnessSeconds;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700134 output+= "<br />";
135 }
136
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700137 /*if(interest.name!=null && interest.name.components!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700138 output+= "NAME: ";
139
140 for(var i=0;i<interest.Name.Components.length;i++){
141 output+= "/"+ DataUtils.toString(interest.Name.Components[i]);
142 }
143 output+= "<br />";
144 output+= "<br />";
145 }*/
146
147 document.getElementById('result').innerHTML = output;
148
149 }
150
151 </script>
152
153</head>
154<body >
155 <form>
156
157 Please Enter a Interest:<br />
158
159 <!-- input id="faceInstance" type="text" name="FACEINSTANCE" value="/PARC/abc" /-->
160
161 </form>
162 <button onclick="decode()">Decode</button>
163
164
165
166 <p id="result">058203e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004d29632310004da9631370004e2c631302e312e312e310004eaa6393639350003d2d6323134373438333634370000</p>
167
168</body>
jeffdd4602f2012-09-16 16:05:01 -0700169</html>