Wentao Shang | bd63e46 | 2012-12-03 16:19:33 -0800 | [diff] [blame] | 1 | /** |
Jeff Thompson | 745026e | 2012-10-13 12:49:20 -0700 | [diff] [blame] | 2 | * This file contains utilities to help encode and decode NDN objects. |
Jeff Thompson | 146d7de | 2012-11-17 16:15:28 -0800 | [diff] [blame] | 3 | * author: Meki Cheraoui |
Jeff Thompson | 745026e | 2012-10-13 12:49:20 -0700 | [diff] [blame] | 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 6 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 7 | function encodeToHexInterest(interest){ |
Jeff Thompson | a5a2a2b | 2012-11-15 00:09:17 -0800 | [diff] [blame] | 8 | return DataUtils.toHex(encodeToBinaryInterest(interest)); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 9 | } |
| 10 | |
| 11 | |
Jeff Thompson | a5a2a2b | 2012-11-15 00:09:17 -0800 | [diff] [blame] | 12 | function encodeToBinaryInterest(interest) { |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 13 | var enc = new BinaryXMLEncoder(); |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 14 | interest.to_ccnb(enc); |
| 15 | |
Jeff Thompson | a5a2a2b | 2012-11-15 00:09:17 -0800 | [diff] [blame] | 16 | return enc.getReducedOstream(); |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 20 | function encodeToHexContentObject(co){ |
Jeff Thompson | a5a2a2b | 2012-11-15 00:09:17 -0800 | [diff] [blame] | 21 | return DataUtils.toHex(encodeToBinaryContentObject(co)); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | function encodeToBinaryContentObject(co){ |
| 25 | var enc = new BinaryXMLEncoder(); |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 26 | co.to_ccnb(enc); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 27 | |
Jeff Thompson | a5a2a2b | 2012-11-15 00:09:17 -0800 | [diff] [blame] | 28 | return enc.getReducedOstream(); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | function encodeForwardingEntry(co){ |
| 32 | var enc = new BinaryXMLEncoder(); |
| 33 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 34 | co.to_ccnb(enc); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 35 | |
| 36 | var bytes = enc.getReducedOstream(); |
| 37 | |
| 38 | return bytes; |
| 39 | |
| 40 | |
| 41 | } |
| 42 | |
| 43 | |
| 44 | |
| 45 | function decodeHexFaceInstance(result){ |
| 46 | |
| 47 | var numbers = DataUtils.toNumbers(result); |
| 48 | |
| 49 | |
Jeff Thompson | 48ff28a | 2013-02-18 22:53:29 -0800 | [diff] [blame^] | 50 | var decoder = new BinaryXMLDecoder(numbers); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 51 | |
| 52 | if(LOG>3)console.log('DECODING HEX FACE INSTANCE \n'+numbers); |
| 53 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 54 | var faceInstance = new FaceInstance(); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 55 | |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 56 | faceInstance.from_ccnb(decoder); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 57 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 58 | return faceInstance; |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 59 | |
| 60 | } |
| 61 | |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 62 | |
| 63 | |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 64 | function decodeHexInterest(result){ |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 65 | var numbers = DataUtils.toNumbers(result); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 66 | |
Jeff Thompson | 48ff28a | 2013-02-18 22:53:29 -0800 | [diff] [blame^] | 67 | var decoder = new BinaryXMLDecoder(numbers); |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 68 | |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 69 | if(LOG>3)console.log('DECODING HEX INTERST \n'+numbers); |
| 70 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 71 | var interest = new Interest(); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 72 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 73 | interest.from_ccnb(decoder); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 74 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 75 | return interest; |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 76 | |
| 77 | } |
| 78 | |
| 79 | |
| 80 | |
| 81 | function decodeHexContentObject(result){ |
| 82 | var numbers = DataUtils.toNumbers(result); |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 83 | |
Jeff Thompson | 48ff28a | 2013-02-18 22:53:29 -0800 | [diff] [blame^] | 84 | var decoder = new BinaryXMLDecoder(numbers); |
Jeff Thompson | 344891b | 2012-11-11 18:41:09 -0800 | [diff] [blame] | 85 | |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 86 | if(LOG>3)console.log('DECODED HEX CONTENT OBJECT \n'+numbers); |
| 87 | |
Jeff Thompson | 48ff28a | 2013-02-18 22:53:29 -0800 | [diff] [blame^] | 88 | var co = new ContentObject(); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 89 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 90 | co.from_ccnb(decoder); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 91 | |
| 92 | return co; |
| 93 | |
| 94 | } |
| 95 | |
| 96 | |
| 97 | |
| 98 | function decodeHexForwardingEntry(result){ |
| 99 | var numbers = DataUtils.toNumbers(result); |
| 100 | |
Jeff Thompson | 48ff28a | 2013-02-18 22:53:29 -0800 | [diff] [blame^] | 101 | var decoder = new BinaryXMLDecoder(numbers); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 102 | |
| 103 | if(LOG>3)console.log('DECODED HEX FORWARDING ENTRY \n'+numbers); |
| 104 | |
Jeff Thompson | 48ff28a | 2013-02-18 22:53:29 -0800 | [diff] [blame^] | 105 | var forwardingEntry = new ForwardingEntry(); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 106 | |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 107 | forwardingEntry.from_ccnb(decoder); |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 108 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 109 | return forwardingEntry; |
Meki Cherkaoui | 8f17361 | 2012-06-06 01:05:40 -0700 | [diff] [blame] | 110 | |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 111 | } |
| 112 | |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 113 | /* |
| 114 | * Decode the Uint8Array which holds SubjectPublicKeyInfo and return an RSAKey. |
| 115 | */ |
| 116 | function decodeSubjectPublicKeyInfo(array) { |
| 117 | var hex = DataUtils.toHex(array).toLowerCase(); |
| 118 | var a = _x509_getPublicKeyHexArrayFromCertHex(hex, _x509_getSubjectPublicKeyPosFromCertHex(hex, 0)); |
| 119 | var rsaKey = new RSAKey(); |
| 120 | rsaKey.setPublic(a[0], a[1]); |
| 121 | return rsaKey; |
| 122 | } |
| 123 | |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 124 | /* Return a user friendly HTML string with the contents of co. |
| 125 | This also outputs to console.log. |
| 126 | */ |
| 127 | function contentObjectToHtml(/* ContentObject */ co) { |
| 128 | var output =""; |
| 129 | |
| 130 | if(co==-1) |
| 131 | output+= "NO CONTENT FOUND" |
| 132 | else if (co==-2) |
| 133 | output+= "CONTENT NAME IS EMPTY" |
| 134 | else{ |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 135 | if(co.name!=null && co.name.components!=null){ |
Jeff Thompson | a5a2a2b | 2012-11-15 00:09:17 -0800 | [diff] [blame] | 136 | output+= "NAME: " + co.name.to_uri(); |
| 137 | |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 138 | output+= "<br />"; |
| 139 | output+= "<br />"; |
| 140 | } |
| 141 | |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 142 | if(co.content !=null){ |
| 143 | output += "CONTENT(ASCII): "+ DataUtils.toString(co.content); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 144 | |
| 145 | output+= "<br />"; |
| 146 | output+= "<br />"; |
| 147 | } |
Jeff Thompson | 86aea88 | 2012-09-29 17:32:48 -0700 | [diff] [blame] | 148 | if(co.content !=null){ |
| 149 | output += "CONTENT(hex): "+ DataUtils.toHex(co.content); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 150 | |
| 151 | output+= "<br />"; |
| 152 | output+= "<br />"; |
| 153 | } |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 154 | if(co.signature !=null && co.signature.signature!=null){ |
| 155 | output += "SIGNATURE(hex): "+ DataUtils.toHex(co.signature.signature); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 156 | |
| 157 | output+= "<br />"; |
| 158 | output+= "<br />"; |
| 159 | } |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 160 | if(co.signedInfo !=null && co.signedInfo.publisher!=null && co.signedInfo.publisher.publisherPublicKeyDigest!=null){ |
| 161 | output += "Publisher Public Key Digest(hex): "+ DataUtils.toHex(co.signedInfo.publisher.publisherPublicKeyDigest); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 162 | |
| 163 | output+= "<br />"; |
| 164 | output+= "<br />"; |
| 165 | } |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 166 | if(co.signedInfo !=null && co.signedInfo.timestamp!=null){ |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 167 | var d = new Date(); |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 168 | d.setTime( co.signedInfo.timestamp.msec ); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 169 | |
| 170 | var bytes = [217, 185, 12, 225, 217, 185, 12, 225]; |
| 171 | |
| 172 | output += "TimeStamp: "+d; |
| 173 | output+= "<br />"; |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 174 | output += "TimeStamp(number): "+ co.signedInfo.timestamp.msec; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 175 | |
| 176 | output+= "<br />"; |
| 177 | } |
Jeff Thompson | 6444788 | 2012-10-14 18:11:33 -0700 | [diff] [blame] | 178 | if(co.signedInfo !=null && co.signedInfo.finalBlockID!=null){ |
| 179 | output += "FinalBlockID: "+ DataUtils.toHex(co.signedInfo.finalBlockID); |
| 180 | output+= "<br />"; |
| 181 | } |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 182 | if(co.signedInfo!=null && co.signedInfo.locator!=null && co.signedInfo.locator.certificate!=null){ |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 183 | var certificateHex = DataUtils.toHex(co.signedInfo.locator.certificate).toLowerCase(); |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 184 | var signature = DataUtils.toHex(co.signature.signature).toLowerCase(); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 185 | var input = DataUtils.toString(co.rawSignatureData); |
| 186 | |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 187 | output += "Hex Certificate: "+ certificateHex ; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 188 | |
| 189 | output+= "<br />"; |
| 190 | output+= "<br />"; |
| 191 | |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 192 | var x509 = new X509(); |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 193 | x509.readCertHex(certificateHex); |
Jeff Thompson | 253cab4 | 2012-12-29 17:48:40 -0800 | [diff] [blame] | 194 | output += "Public key (hex) modulus: " + x509.subjectPublicKeyRSA.n.toString(16) + "<br/>"; |
| 195 | output += "exponent: " + x509.subjectPublicKeyRSA.e.toString(16) + "<br/>"; |
| 196 | output += "<br/>"; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 197 | |
Wentao Shang | fddf90d | 2013-01-05 17:18:49 -0800 | [diff] [blame] | 198 | var result = x509.subjectPublicKeyRSA.verifyByteArray(co.rawSignatureData, null, signature); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 199 | if(LOG>2) console.log('result is '+result); |
| 200 | |
| 201 | var n = x509.subjectPublicKeyRSA.n; |
| 202 | var e = x509.subjectPublicKeyRSA.e; |
| 203 | |
| 204 | if(LOG>2) console.log('PUBLIC KEY n after is '); |
| 205 | if(LOG>2) console.log(n); |
| 206 | |
| 207 | if(LOG>2) console.log('EXPONENT e after is '); |
| 208 | if(LOG>2) console.log(e); |
| 209 | |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 210 | if(result) |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 211 | output += 'SIGNATURE VALID'; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 212 | else |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 213 | output += 'SIGNATURE INVALID'; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 214 | |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 215 | //output += "VALID: "+ toHex(co.signedInfo.locator.publicKey); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 216 | |
| 217 | output+= "<br />"; |
| 218 | output+= "<br />"; |
| 219 | |
| 220 | //if(LOG>4) console.log('str'[1]); |
| 221 | } |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 222 | if(co.signedInfo!=null && co.signedInfo.locator!=null && co.signedInfo.locator.publicKey!=null){ |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 223 | var publickeyHex = DataUtils.toHex(co.signedInfo.locator.publicKey).toLowerCase(); |
| 224 | var publickeyString = DataUtils.toString(co.signedInfo.locator.publicKey); |
| 225 | var signature = DataUtils.toHex(co.signature.signature).toLowerCase(); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 226 | var input = DataUtils.toString(co.rawSignatureData); |
| 227 | |
Wentao Shang | fddf90d | 2013-01-05 17:18:49 -0800 | [diff] [blame] | 228 | var wit = null; |
| 229 | var witHex = ""; |
| 230 | if (co.signature.Witness != null) { |
| 231 | wit = new Witness(); |
| 232 | wit.decode(co.signature.Witness); |
| 233 | witHex = DataUtils.toHex(co.signature.Witness); |
| 234 | } |
| 235 | |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 236 | output += "Public key: " + publickeyHex; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 237 | |
| 238 | output+= "<br />"; |
| 239 | output+= "<br />"; |
| 240 | |
| 241 | if(LOG>2) console.log(" ContentName + SignedInfo + Content = "+input); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 242 | if(LOG>2) console.log(" PublicKeyHex = "+publickeyHex ); |
| 243 | if(LOG>2) console.log(" PublicKeyString = "+publickeyString ); |
| 244 | |
| 245 | if(LOG>2) console.log(" Signature "+signature ); |
Wentao Shang | fddf90d | 2013-01-05 17:18:49 -0800 | [diff] [blame] | 246 | if(LOG>2) console.log(" Witness "+witHex ); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 247 | |
| 248 | if(LOG>2) console.log(" Signature NOW IS" ); |
| 249 | |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 250 | if(LOG>2) console.log(co.signature.signature); |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 251 | |
| 252 | var rsakey = decodeSubjectPublicKeyInfo(co.signedInfo.locator.publicKey); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 253 | |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 254 | output += "Public key (hex) modulus: " + rsakey.n.toString(16) + "<br/>"; |
| 255 | output += "exponent: " + rsakey.e.toString(16) + "<br/>"; |
| 256 | output += "<br/>"; |
| 257 | |
Wentao Shang | fddf90d | 2013-01-05 17:18:49 -0800 | [diff] [blame] | 258 | var result = rsakey.verifyByteArray(co.rawSignatureData, wit, signature); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 259 | // var result = rsakey.verifyString(input, signature); |
| 260 | |
Wentao Shang | 2b740e6 | 2012-12-07 00:02:53 -0800 | [diff] [blame] | 261 | if(LOG>2) console.log('PUBLIC KEY n after is '); |
| 262 | if(LOG>2) console.log(rsakey.n); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 263 | |
Wentao Shang | 2b740e6 | 2012-12-07 00:02:53 -0800 | [diff] [blame] | 264 | if(LOG>2) console.log('EXPONENT e after is '); |
| 265 | if(LOG>2) console.log(rsakey.e); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 266 | |
| 267 | if(result) |
Wentao Shang | fddf90d | 2013-01-05 17:18:49 -0800 | [diff] [blame] | 268 | output += 'SIGNATURE VALID'; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 269 | else |
Wentao Shang | fddf90d | 2013-01-05 17:18:49 -0800 | [diff] [blame] | 270 | output += 'SIGNATURE INVALID'; |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 271 | |
Jeff Thompson | e85ff1d | 2012-09-29 21:21:57 -0700 | [diff] [blame] | 272 | //output += "VALID: "+ toHex(co.signedInfo.locator.publicKey); |
jeff | cc8b3a9 | 2012-09-03 15:13:27 -0700 | [diff] [blame] | 273 | |
| 274 | output+= "<br />"; |
| 275 | output+= "<br />"; |
| 276 | |
| 277 | //if(LOG>4) console.log('str'[1]); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | return output; |
| 282 | } |
Jeff Thompson | 68fccd6 | 2012-12-29 17:38:23 -0800 | [diff] [blame] | 283 | |
| 284 | |