mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Separate the sync layer from its clients. #112
This commit is contained in:
@@ -2,6 +2,7 @@ package org.briarproject.api.sync;
|
||||
|
||||
import org.briarproject.api.UniqueId;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
@@ -9,14 +10,16 @@ import java.util.Arrays;
|
||||
*/
|
||||
public class GroupId extends UniqueId {
|
||||
|
||||
/** Label for hashing groups to calculate their identifiers. */
|
||||
public static final byte[] LABEL =
|
||||
"GROUP_ID".getBytes(Charset.forName("US-ASCII"));
|
||||
|
||||
public GroupId(byte[] id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof GroupId)
|
||||
return Arrays.equals(id, ((GroupId) o).id);
|
||||
return false;
|
||||
return o instanceof GroupId && Arrays.equals(id, ((GroupId) o).id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user