mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
28 lines
596 B
Java
28 lines
596 B
Java
package org.briarproject.api.identity;
|
|
|
|
import org.briarproject.api.UniqueId;
|
|
|
|
import java.nio.charset.Charset;
|
|
|
|
/**
|
|
* Type-safe wrapper for a byte array that uniquely identifies an
|
|
* {@link org.briarproject.api.identity.Author Author}.
|
|
*/
|
|
public class AuthorId extends UniqueId {
|
|
|
|
/**
|
|
* Label for hashing authors to calculate their identities.
|
|
*/
|
|
public static final byte[] LABEL =
|
|
"AUTHOR_ID".getBytes(Charset.forName("US-ASCII"));
|
|
|
|
public AuthorId(byte[] id) {
|
|
super(id);
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
return o instanceof AuthorId && super.equals(o);
|
|
}
|
|
}
|