mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Added a random salt to prevent ID clashes between anonymous messages.
This commit is contained in:
@@ -79,6 +79,9 @@ class MessageReader implements ObjectReader<Message> {
|
||||
// Read the timestamp
|
||||
long timestamp = r.readInt64();
|
||||
if(timestamp < 0L) throw new FormatException();
|
||||
// Read the salt
|
||||
byte[] salt = r.readBytes(Message.SALT_LENGTH);
|
||||
if(salt.length != Message.SALT_LENGTH) throw new FormatException();
|
||||
// Skip the message body
|
||||
r.readBytes(Message.MAX_BODY_LENGTH);
|
||||
// Record the length of the data covered by the author's signature
|
||||
|
||||
Reference in New Issue
Block a user