Amarula.Protocol.Signal.Group.GroupCipher (amarula v0.1.0)
View SourceHandles encryption and decryption of group messages using the Signal protocol.
This module provides the main interface for group message encryption/decryption, managing sender keys and coordinating with the sender key store.
Summary
Functions
@spec decrypt(map(), Amarula.Protocol.Signal.Group.SenderKeyName.t(), binary()) :: {:ok, binary()} | {:error, String.t()}
Decrypts a group message.
Parameters
sender_key_store- The store for managing sender keyssender_key_name- The name identifying the sender keyencrypted_message- The encrypted message to decrypt
Returns
{:ok, plaintext}- Success with decrypted message{:error, reason}- Error with reason
@spec encrypt(map(), Amarula.Protocol.Signal.Group.SenderKeyName.t(), binary()) :: {:ok, binary()} | {:error, String.t()}
Encrypts a message for group communication.
Parameters
sender_key_store- The store for managing sender keyssender_key_name- The name identifying the sender keyplaintext- The message to encrypt
Returns
{:ok, encrypted_message}- Success with encrypted message{:error, reason}- Error with reason