Class GroupSessionBuilder
-
- All Implemented Interfaces:
public class GroupSessionBuilderGroupSessionBuilder is responsible for setting up group SenderKey encrypted sessions.
Once a session has been established, org.signal.libsignal.protocol.groups.GroupCipher can be used to encrypt/decrypt messages in that session.
The built sessions are unidirectional: they can be used either for sending or for receiving, but not both.
Sessions are constructed per (senderName + deviceId) tuple, with sending additionally parameterized on a per-group distributionId. Remote logical users are identified by their senderName, and each logical user can have multiple physical devices.
This class is not thread-safe.
Moxie Marlinspike
-
-
Constructor Summary
Constructors Constructor Description GroupSessionBuilder(SenderKeyStore senderKeyStore)
-
Method Summary
Modifier and Type Method Description voidprocess(SignalProtocolAddress sender, SenderKeyDistributionMessage senderKeyDistributionMessage)Construct a group session for receiving messages from sender. SenderKeyDistributionMessagecreate(SignalProtocolAddress sender, UUID distributionId)Construct a group session for sending messages. -
-
Constructor Detail
-
GroupSessionBuilder
GroupSessionBuilder(SenderKeyStore senderKeyStore)
-
-
Method Detail
-
process
void process(SignalProtocolAddress sender, SenderKeyDistributionMessage senderKeyDistributionMessage)
Construct a group session for receiving messages from sender.
- Parameters:
sender- The address of the device that sent the message.senderKeyDistributionMessage- A received SenderKeyDistributionMessage.
-
create
SenderKeyDistributionMessage create(SignalProtocolAddress sender, UUID distributionId)
Construct a group session for sending messages.
- Parameters:
sender- The address of the current client.distributionId- An opaque identifier that uniquely identifies the group (but isn't the group ID).- Returns:
A SenderKeyDistributionMessage that is individually distributed to each member of the group.
-
-
-
-