public class MetaLeaseSet extends LeaseSet2
_expires, _flags, _offlineSignature, _options, _published, _transientExpires, _transientSigningPublicKey
_byteified, _checked, _destination, _encryptionKey, _lastExpiration, _leases, _receivedAsPublished, _signingKey, MAX_LEASES
_currentRoutingKey, _routingKeyGenMod, _signature, KEY_TYPE_ENCRYPTED_LS2, KEY_TYPE_LEASESET, KEY_TYPE_LS2, KEY_TYPE_META_LS2, KEY_TYPE_ROUTERINFO, KEY_TYPE_SERVICE_LIST, KEY_TYPE_SERVICE_RECORD
Constructor and Description |
---|
MetaLeaseSet() |
Modifier and Type | Method and Description |
---|---|
void |
addEncryptionKey(PublicKey key)
Add an encryption key.
|
void |
addLease(Lease lease) |
boolean |
equals(Object object) |
int |
getType()
Get the type of the data structure.
|
int |
hashCode()
the destination has enough randomness in it to use it by itself for speed
|
void |
readBytes(InputStream in)
This does NOT validate the signature
|
void |
setEncryptionKey(PublicKey key) |
int |
size()
Number of bytes, NOT including signature
|
String |
toString() |
protected void |
writeBytesWithoutSig(OutputStream out)
Without sig.
|
encrypt, getBlindedHash, getBytes, getEncryptionKey, getEncryptionKeys, getOption, getReceivedAsPublished, getTransientSigningKey, isOffline, isUnpublished, offlineSign, readHeader, readOfflineBytes, setBlindedHash, setOfflineSignature, setOptions, setUnpublished, sign, verifyOfflineSignature, verifyOfflineSignature, verifySignature, writeBody, writeBytes, writeHeader, writeOfflineBytes
getDate, getDestination, getEarliestLeaseDate, getKeysAndCert, getLatestLeaseDate, getLease, getLeaseCount, getReceivedAsReply, getSigningKey, isCurrent, setDestination, setReceivedAsPublished, setReceivedAsReply, setSigningKey, verifySignature
getHash, getRoutingKey, getSignature, getSigningPublicKey, isLeaseSet, isLeaseSet, setSignature, validateRoutingKey
calculateHash, fromBase64, fromByteArray, read, toBase64, toByteArray
public int getType()
DatabaseEntry
public void setEncryptionKey(PublicKey key)
setEncryptionKey
in class LeaseSet
UnsupportedOperationException
- alwayspublic void addEncryptionKey(PublicKey key)
LeaseSet2
addEncryptionKey
in class LeaseSet2
UnsupportedOperationException
- alwayspublic void readBytes(InputStream in) throws DataFormatException, IOException
readBytes
in interface DataStructure
readBytes
in class LeaseSet2
in
- stream to read fromIllegalStateException
- if called more than once or Destination already setDataFormatException
- if the data is improperly formattedIOException
- if there was a problem reading the streamprotected void writeBytesWithoutSig(OutputStream out) throws DataFormatException, IOException
writeBytesWithoutSig
in class LeaseSet2
DataFormatException
IOException
public void addLease(Lease lease)
addLease
in class LeaseSet2
lease
- must be a MetaLeaseIllegalArgumentException
- if not a MetaLeasepublic int hashCode()