mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Include unique device ID in transport updates.
This commit is contained in:
16
briar-api/src/org/briarproject/api/DeviceId.java
Normal file
16
briar-api/src/org/briarproject/api/DeviceId.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package org.briarproject.api;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/** Type-safe wrapper for a byte array that uniquely identifies a device. */
|
||||
public class DeviceId extends UniqueId {
|
||||
|
||||
public DeviceId(byte[] id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof DeviceId && Arrays.equals(id, ((DeviceId) o).id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user