mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Simpler key rotation: rotation period R = C + L, retention period = 3R.
This commit is contained in:
@@ -5,8 +5,8 @@ import net.sf.briar.api.TransportId;
|
||||
|
||||
public class Endpoint {
|
||||
|
||||
private final ContactId contactId;
|
||||
private final TransportId transportId;
|
||||
protected final ContactId contactId;
|
||||
protected final TransportId transportId;
|
||||
private final long epoch;
|
||||
private final boolean alice;
|
||||
|
||||
|
||||
@@ -53,4 +53,20 @@ public class TemporarySecret extends Endpoint {
|
||||
public byte[] getWindowBitmap() {
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int periodHashCode = (int) (period ^ (period >>> 32));
|
||||
return contactId.hashCode() ^ transportId.hashCode() ^ periodHashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if(o instanceof TemporarySecret) {
|
||||
TemporarySecret s = (TemporarySecret) o;
|
||||
return contactId.equals(s.contactId) &&
|
||||
transportId.equals(s.transportId) && period == s.period;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user