mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Add kotlin/proto level message processing.
This commit is contained in:
committed by
Alex Hart
parent
28f27915c5
commit
2e45bd719a
@@ -3,6 +3,8 @@ package org.thoughtcrime.securesms.groups;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
|
||||
import org.signal.core.util.DatabaseId;
|
||||
import org.signal.core.util.Hex;
|
||||
import org.signal.libsignal.protocol.kdf.HKDFv3;
|
||||
@@ -83,6 +85,10 @@ public abstract class GroupId implements DatabaseId {
|
||||
.getGroupIdentifier());
|
||||
}
|
||||
|
||||
public static GroupId.Push push(ByteString bytes) throws BadGroupIdException {
|
||||
return push(bytes.toByteArray());
|
||||
}
|
||||
|
||||
public static GroupId.Push push(byte[] bytes) throws BadGroupIdException {
|
||||
return bytes.length == V2_BYTE_LENGTH ? v2(bytes) : v1(bytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user