blob: 2a1e082e8c71352a69e1fcf2220ee0c28d8de41f [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
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070053 <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070054
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070055 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn.js"></script>
56 <script language="JavaScript" type="text/javascript" src="../securityLib/jsbn2.js"></script>
57 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa.js"></script>
58 <script language="JavaScript" type="text/javascript" src="../securityLib/rsa2.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070059
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070060 <script language="JavaScript" type="text/javascript" src="../securityLib/sha1.js"></script>
61 <script language="JavaScript" type="text/javascript" src="../securityLib/sha256.js"></script>
62 <script language="JavaScript" type="text/javascript" src="../securityLib/sha512.js"></script>
63 <script language="JavaScript" type="text/javascript" src="../securityLib/md5.js"></script>
64 <script language="JavaScript" type="text/javascript" src="../securityLib/ripemd160.js"></script>
65 <script language="JavaScript" type="text/javascript" src="../securityLib/base64.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070066
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070067 <script language="JavaScript" type="text/javascript" src="../securityLib/rsapem-1.1.js"></script>
68 <script language="JavaScript" type="text/javascript" src="../securityLib/rsasign-1.2.js"></script>
69 <script language="JavaScript" type="text/javascript" src="../securityLib/asn1hex-1.1.js"></script>
70 <script language="JavaScript" type="text/javascript" src="../securityLib/x509-1.1.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070071
72 <script type="text/javascript">
73
74 function decode(){
75
76 var input = document.getElementById('result').innerHTML;
77
78
79 var faceInstance = decodeHexFaceInstance(input);
80
81 if(LOG>3)console.log('FACE INSTANCE DECODED');
82 if(LOG>3)console.log(faceInstance);
83
84 ///////////////////////////////////////
85
86 var output ="";
87
88 if(faceInstance.PublisherPublicKeyDigest!=null ){
89 output+= "PublisherPublicKeyDigest: ";
90
91 output+= DataUtils.toHex(faceInstance.PublisherPublicKeyDigest.PublisherPublicKeyDigest);
92
93 //output+= "PUBLISHER ID TYPE: ";
94 //output+= faceInstance.PublisherPublicKeyDigest.PublisherPublicKeyDigest;
95
96 output+= "<br />";
97 output+= "<br />";
98
99 }
100
101 if(faceInstance.FaceID!=null){
102 output+= "FaceID: ";
103
104 output+= faceInstance.FaceID;
105 output+= "<br />";
106 }
107
108 if(faceInstance.IPProto!=null){
109 output+= "IPProto: ";
110
111 output+= faceInstance.IPProto;
112 output+= "<br />";
113 }
114
115 if(faceInstance.Host!=null){
116 output+= "Host: ";
117
118 output+= faceInstance.Host;
119 output+= "<br />";
120 }
121
122 if(faceInstance.Port!=null){
123 output+= "Port: ";
124
125 output+= faceInstance.Port;
126 output+= "<br />";
127 }
128 if(faceInstance.FreshnessSeconds!=null){
129 output+= "FreshnessSeconds: ";
130
131 output+= faceInstance.FreshnessSeconds;
132 output+= "<br />";
133 }
134
135 /*if(interest.Name!=null && interest.Name.Components!=null){
136 output+= "NAME: ";
137
138 for(var i=0;i<interest.Name.Components.length;i++){
139 output+= "/"+ DataUtils.toString(interest.Name.Components[i]);
140 }
141 output+= "<br />";
142 output+= "<br />";
143 }*/
144
145 document.getElementById('result').innerHTML = output;
146
147 }
148
149 </script>
150
151</head>
152<body >
153 <form>
154
155 Please Enter a Interest:<br />
156
157 <!-- input id="faceInstance" type="text" name="FACEINSTANCE" value="/PARC/abc" /-->
158
159 </form>
160 <button onclick="decode()">Decode</button>
161
162
163
164 <p id="result">058203e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004d29632310004da9631370004e2c631302e312e312e310004eaa6393639350003d2d6323134373438333634370000</p>
165
166</body>
167</html>