blob: 5c4b723f5bb0149ccfba5820365feaa1115dfa1d [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/BinaryXMLCodec.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070036
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070037 <script type="text/javascript" src="../encoding/BinaryXMLDecoder.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070038
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070039 <script type="text/javascript" src="../encoding/DataUtils.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070040
jeffdd4602f2012-09-16 16:05:01 -070041 <script type="text/javascript" src="../encoding/EncodingUtils.js"></script>
42
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070043 <script language="JavaScript" type="text/javascript" src="../security/KeyManager.js"></script>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070044
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070045 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070049
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070050 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070056
Jeff Thompson7ed5ef52012-08-26 11:28:48 -070057 <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>
Meki Cherkaoui8f173612012-06-06 01:05:40 -070061
62 <script type="text/javascript">
63
64 function decode(){
65
66 var input = document.getElementById('result').innerHTML;
67
68
69 var faceInstance = decodeHexFaceInstance(input);
70
71 if(LOG>3)console.log('FACE INSTANCE DECODED');
72 if(LOG>3)console.log(faceInstance);
73
74 ///////////////////////////////////////
75
76 var output ="";
77
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070078 if(faceInstance.publisherPublicKeyDigest!=null ){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070079 output+= "PublisherPublicKeyDigest: ";
80
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070081 output+= DataUtils.toHex(faceInstance.publisherPublicKeyDigest.publisherPublicKeyDigest);
Meki Cherkaoui8f173612012-06-06 01:05:40 -070082
83 //output+= "PUBLISHER ID TYPE: ";
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070084 //output+= faceInstance.publisherPublicKeyDigest.PublisherPublicKeyDigest;
Meki Cherkaoui8f173612012-06-06 01:05:40 -070085
86 output+= "<br />";
87 output+= "<br />";
88
89 }
90
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070091 if(faceInstance.faceID!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070092 output+= "FaceID: ";
93
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070094 output+= faceInstance.faceID;
Meki Cherkaoui8f173612012-06-06 01:05:40 -070095 output+= "<br />";
96 }
97
Jeff Thompsone85ff1d2012-09-29 21:21:57 -070098 if(faceInstance.ipProto!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -070099 output+= "IPProto: ";
100
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700101 output+= faceInstance.ipProto;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700102 output+= "<br />";
103 }
104
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700105 if(faceInstance.host!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700106 output+= "Host: ";
107
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700108 output+= faceInstance.host;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700109 output+= "<br />";
110 }
111
112 if(faceInstance.Port!=null){
113 output+= "Port: ";
114
115 output+= faceInstance.Port;
116 output+= "<br />";
117 }
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700118 if(faceInstance.freshnessSeconds!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700119 output+= "FreshnessSeconds: ";
120
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700121 output+= faceInstance.freshnessSeconds;
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700122 output+= "<br />";
123 }
124
Jeff Thompsone85ff1d2012-09-29 21:21:57 -0700125 /*if(interest.name!=null && interest.name.components!=null){
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700126 output+= "NAME: ";
127
128 for(var i=0;i<interest.Name.Components.length;i++){
129 output+= "/"+ DataUtils.toString(interest.Name.Components[i]);
130 }
131 output+= "<br />";
132 output+= "<br />";
133 }*/
134
135 document.getElementById('result').innerHTML = output;
136
137 }
138
139 </script>
140
141</head>
142<body >
143 <form>
144
Jeff Thompsonf3bd3592012-09-29 23:25:30 -0700145 Please Press Decode:<br />
Meki Cherkaoui8f173612012-06-06 01:05:40 -0700146
147 <!-- input id="faceInstance" type="text" name="FACEINSTANCE" value="/PARC/abc" /-->
148
149 </form>
150 <button onclick="decode()">Decode</button>
151
152
153
154 <p id="result">058203e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004d29632310004da9631370004e2c631302e312e312e310004eaa6393639350003d2d6323134373438333634370000</p>
155
156</body>
jeffdd4602f2012-09-16 16:05:01 -0700157</html>