mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Sign the message with the group's private key if the group is
restricted, and check the signature if it should be present.
This commit is contained in:
@@ -6,10 +6,21 @@ import java.security.PrivateKey;
|
||||
|
||||
public interface MessageEncoder {
|
||||
|
||||
/** Encodes an anonymous to an unrestricted group. */
|
||||
Message encodeMessage(MessageId parent, Group group, byte[] body)
|
||||
throws IOException;
|
||||
throws IOException, GeneralSecurityException;
|
||||
|
||||
/** Encodes an anonymous message to a restricted group. */
|
||||
Message encodeMessage(MessageId parent, Group group, PrivateKey groupKey,
|
||||
byte[] body) throws IOException, GeneralSecurityException;
|
||||
|
||||
/** Encodes a pseudonymous message to an unrestricted group. */
|
||||
Message encodeMessage(MessageId parent, Group group, Author author,
|
||||
PrivateKey privateKey, byte[] body) throws IOException,
|
||||
PrivateKey authorKey, byte[] body) throws IOException,
|
||||
GeneralSecurityException;
|
||||
|
||||
/** Encode a pseudonymous message to a restricted group. */
|
||||
Message encodeMessage(MessageId parent, Group group, PrivateKey groupKey,
|
||||
Author author, PrivateKey authorKey, byte[] body)
|
||||
throws IOException, GeneralSecurityException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user