mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Removed salt from unrestricted groups: two unrestricted groups with
the same name will now be treated as the same group (this seems more intuitive than the alternative).
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package net.sf.briar.api.protocol;
|
||||
|
||||
import java.security.PublicKey;
|
||||
|
||||
import net.sf.briar.api.serial.Writable;
|
||||
|
||||
/** A group to which users may subscribe. */
|
||||
@@ -13,22 +11,9 @@ public interface Group extends Writable {
|
||||
/** Returns the group's name. */
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Returns true if messages sent to the group must be signed with a
|
||||
* particular private key.
|
||||
*/
|
||||
boolean isRestricted();
|
||||
|
||||
/**
|
||||
* If the group is restricted, returns null. Otherwise returns a salt
|
||||
* value that is combined with the group's name to generate its unique
|
||||
* identifier.
|
||||
*/
|
||||
byte[] getSalt();
|
||||
|
||||
/**
|
||||
* If the group is restricted, returns the public key that is used to
|
||||
* authorise all messages sent to the group. Otherwise returns null.
|
||||
*/
|
||||
PublicKey getPublicKey();
|
||||
byte[] getPublicKey();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,5 @@ package net.sf.briar.api.protocol;
|
||||
|
||||
public interface GroupFactory {
|
||||
|
||||
Group createGroup(GroupId id, String name, boolean restricted,
|
||||
byte[] saltOrKey);
|
||||
Group createGroup(GroupId id, String name, byte[] publicKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user