Changeset b4f331e6
- Timestamp:
- May 31, 2019 1:17:30 PM (21 months ago)
- Branches:
- master
- Children:
- 8a4c469
- Parents:
- 6722485
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/net/i2p/data/BlindData.java
r6722485 rb4f331e6 1 1 package net.i2p.data; 2 3 import java.util.Date; 2 4 3 5 import net.i2p.I2PAppContext; … … 26 28 private boolean _secretRequired; 27 29 private boolean _authRequired; 30 private long _date; 28 31 29 32 /** … … 95 98 if (authKey != null) 96 99 _authRequired = true; 100 _date = _context.clock().now(); 97 101 // defer until needed 98 102 //calculate(); … … 245 249 } 246 250 251 /** 252 * @since 0.9.41 253 */ 254 public void setDate(long date) { 255 _date = date; 256 } 257 258 /** 259 * @return creation date or as overridden by setDate() 260 * @since 0.9.41 261 */ 262 public long getDate() { 263 return _date; 264 } 265 247 266 @Override 248 267 public synchronized String toString() { … … 272 291 buf.append("\n\tDestination : unknown"); 273 292 buf.append("\n\tB32 : ").append(toBase32()); 293 buf.append("\n\tCreated : ").append((new Date(_date)).toString()); 274 294 buf.append(']'); 275 295 return buf.toString(); -
router/java/src/net/i2p/router/networkdb/kademlia/BlindCache.java
r6722485 rb4f331e6 381 381 } 382 382 BlindData rv; 383 // TODO pass privkey384 383 if (ss[7].length() > 0) { 385 384 Destination dest = new Destination(ss[7]); 386 385 if (!spk.equals(dest.getSigningPublicKey())) 387 386 throw new DataFormatException("spk mismatch"); 388 rv = new BlindData(_context, dest, st2, secret );387 rv = new BlindData(_context, dest, st2, secret, auth, privkey); 389 388 } else { 390 rv = new BlindData(_context, spk, st2, secret); 391 } 389 rv = new BlindData(_context, spk, st2, secret, auth, privkey); 390 } 391 rv.setDate(time); 392 392 return rv; 393 393 } … … 403 403 buf.append(bd.getBlindedSigType().getCode()).append(','); 404 404 buf.append(bd.getAuthType()).append(','); 405 // timestamp todo 406 buf.append('0').append(','); 405 buf.append(bd.getDate()).append(','); 407 406 buf.append(spk.toBase64()).append(','); 408 407 String secret = bd.getSecret();
Note: See TracChangeset
for help on using the changeset viewer.