forked from I2P_Developers/i2p.i2p
Data: Set flag bit when blinded
This commit is contained in:
@ -401,6 +401,7 @@ public class EncryptedLeaseSet extends LeaseSet2 {
|
||||
// inner LS is always unpublished
|
||||
int saveFlags = _flags;
|
||||
setUnpublished();
|
||||
setBlindedWhenPublished();
|
||||
try {
|
||||
// Inner layer - type - data covered by sig
|
||||
baos.write(KEY_TYPE_LS2);
|
||||
|
@ -43,8 +43,13 @@ public class LeaseSet2 extends LeaseSet {
|
||||
// If this leaseset was formerly blinded, the blinded hash, so we can find it again
|
||||
private Hash _blindedHash;
|
||||
|
||||
private static final int FLAG_OFFLINE_KEYS = 1;
|
||||
private static final int FLAG_UNPUBLISHED = 2;
|
||||
private static final int FLAG_OFFLINE_KEYS = 0x01;
|
||||
private static final int FLAG_UNPUBLISHED = 0x02;
|
||||
/**
|
||||
* Set if the unencrypted LS, when published, will be blinded/encrypted
|
||||
* @since 0.9.42
|
||||
*/
|
||||
private static final int FLAG_BLINDED = 0x04;
|
||||
private static final int MAX_KEYS = 8;
|
||||
|
||||
public LeaseSet2() {
|
||||
@ -82,6 +87,22 @@ public class LeaseSet2 extends LeaseSet {
|
||||
public void setUnpublished() {
|
||||
_flags |= FLAG_UNPUBLISHED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if the unencrypted LS, when published, will be blinded/encrypted
|
||||
* @since 0.9.42
|
||||
*/
|
||||
public boolean isBlindedWhenPublished() {
|
||||
return (_flags & FLAG_BLINDED) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if the unencrypted LS, when published, will be blinded/encrypted
|
||||
* @since 0.9.42
|
||||
*/
|
||||
public void setBlindedWhenPublished() {
|
||||
_flags |= FLAG_BLINDED;
|
||||
}
|
||||
|
||||
/**
|
||||
* If true, we received this LeaseSet by a remote peer publishing it to
|
||||
|
Reference in New Issue
Block a user