X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/22f19c406779893d08675c2d06d2b7708cc3f2a8..9e6a3534275d5bac8454792e05280f13fa5ef13c:/src/main/java/org/asamk/signal/manager/GroupLinkPassword.java diff --git a/src/main/java/org/asamk/signal/manager/GroupLinkPassword.java b/src/main/java/org/asamk/signal/manager/GroupLinkPassword.java deleted file mode 100644 index 38e2aaf4..00000000 --- a/src/main/java/org/asamk/signal/manager/GroupLinkPassword.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.asamk.signal.manager; - -import java.util.Arrays; - -public final class GroupLinkPassword { - - private static final int SIZE = 16; - - private final byte[] bytes; - - public static GroupLinkPassword createNew() { - return new GroupLinkPassword(KeyUtils.getSecretBytes(SIZE)); - } - - public static GroupLinkPassword fromBytes(byte[] bytes) { - return new GroupLinkPassword(bytes); - } - - private GroupLinkPassword(byte[] bytes) { - this.bytes = bytes; - } - - public byte[] serialize() { - return bytes.clone(); - } - - @Override - public boolean equals(Object other) { - if (!(other instanceof GroupLinkPassword)) { - return false; - } - - return Arrays.equals(bytes, ((GroupLinkPassword) other).bytes); - } - - @Override - public int hashCode() { - return Arrays.hashCode(bytes); - } -}