blob: e82003aeca112be614a2c5f537d2dfe29a2078eb [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 Thompsonc3164722012-09-30 18:35:02 -070011 <script type="text/javascript" src="../util/CCNProtocolDTags.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070012
Jeff Thompsonc3164722012-09-30 18:35:02 -070013 <script type="text/javascript" src="../util/CCNTime.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070014
Jeff Thompsonf3bd3592012-09-29 23:25:30 -070015 <script type="text/javascript" src="../Name.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 Thompsonc3164722012-09-30 18:35:02 -070019 <script type="text/javascript" src="../encoding/DateFormat.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070020
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070021 <script type="text/javascript" src="../Interest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070022
Jeff Thompsonc3164722012-09-30 18:35:02 -070023 <script type="text/javascript" src="../Key.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070024
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070025 <script type="text/javascript" src="../PublisherID.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070026
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070027 <script type="text/javascript" src="../PublisherPublicKeyDigest.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070028
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070029 <script type="text/javascript" src="../FaceInstance.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070030
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070031 <script type="text/javascript" src="../ForwardingEntry.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070032
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070033 <script type="text/javascript" src="../encoding/BinaryXMLEncoder.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070034
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070035 <script type="text/javascript" src="../encoding/BinaryXMLDecoder.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070036
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070037 <script type="text/javascript" src="../encoding/DataUtils.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070038
jeffdd4602f2012-09-16 16:05:01 -070039 <script type="text/javascript" src="../encoding/EncodingUtils.js"></script>
40
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070041 <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070042
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070043 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070047
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070048 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070054
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070055 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070059
60 <script type="text/javascript">
61
62 function decode(){
63
64 var input = document.getElementById('result').innerHTML;
65
66
67 var faceInstance = decodeHexFaceInstance(input);
68
69 if(LOG>3)console.log('FACE INSTANCE DECODED');
70 if(LOG>3)console.log(faceInstance);
71
72 ///////////////////////////////////////
73
74 var output ="";
75
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070076 if(faceInstance.publisherPublicKeyDigest!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070077 output+= "PublisherPublicKeyDigest: ";
78
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070079 output+= DataUtils.toHex(faceInstance.publisherPublicKeyDigest.publisherPublicKeyDigest);
Meki Cherkaoui8f173612012-06-06 01:05:40 -070080
81 //output+= "PUBLISHER ID TYPE: ";
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070082 //output+= faceInstance.publisherPublicKeyDigest.PublisherPublicKeyDigest;
Meki Cherkaoui8f173612012-06-06 01:05:40 -070083
84 output+= "<br />";
85 output+= "<br />";
86
87 }
88
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070089 if(faceInstance.faceID!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070090 output+= "FaceID: ";
91
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070092 output+= faceInstance.faceID;
Meki Cherkaoui8f173612012-06-06 01:05:40 -070093 output+= "<br />";
94 }
95
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070096 if(faceInstance.ipProto!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070097 output+= "IPProto: ";
98
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070099 output+= faceInstance.ipProto;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700100 output+= "<br />";
101 }
102
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700103 if(faceInstance.host!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700104 output+= "Host: ";
105
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700106 output+= faceInstance.host;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700107 output+= "<br />";
108 }
109
110 if(faceInstance.Port!=null){
111 output+= "Port: ";
112
113 output+= faceInstance.Port;
114 output+= "<br />";
115 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700116 if(faceInstance.freshnessSeconds!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700117 output+= "FreshnessSeconds: ";
118
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700119 output+= faceInstance.freshnessSeconds;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700120 output+= "<br />";
121 }
122
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700123 /*if(interest.name!=null && interest.name.components!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700124 output+= "NAME: ";
125
126 for(var i=0;i<interest.Name.Components.length;i++){
127 output+= "/"+ DataUtils.toString(interest.Name.Components[i]);
128 }
129 output+= "<br />";
130 output+= "<br />";
131 }*/
132
133 document.getElementById('result').innerHTML = output;
134
135 }
136
137 </script>
138
139</head>
140<body >
141 <form>
142
Jeff Thompsonf3bd3592012-09-29 23:25:30 -0700143 Please Press Decode:<br />
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700144
145 <!-- input id="faceInstance" type="text" name="FACEINSTANCE" value="/PARC/abc" /-->
146
147 </form>
148 <button onclick="decode()">Decode</button>
149
150
151
152 <p id="result">058203e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004d29632310004da9631370004e2c631302e312e312e310004eaa6393639350003d2d6323134373438333634370000</p>
153
154</body>
jeffdd4602f2012-09-16 16:05:01 -0700155</html>