Reject old timestamps when deriving rotation mode keys.

This commit is contained in:
akwizgran
2021-06-09 11:54:10 +01:00
committed by Torsten Grote
parent 07afb955f7
commit d8230afae3
11 changed files with 343 additions and 42 deletions

View File

@@ -163,10 +163,15 @@ public class TestUtils {
public static Message getMessage(GroupId groupId) {
int bodyLength = 1 + random.nextInt(MAX_MESSAGE_BODY_LENGTH);
return getMessage(groupId, bodyLength);
return getMessage(groupId, bodyLength, timestamp);
}
public static Message getMessage(GroupId groupId, int bodyLength) {
return getMessage(groupId, bodyLength, timestamp);
}
public static Message getMessage(GroupId groupId, int bodyLength,
long timestamp) {
MessageId id = new MessageId(getRandomId());
byte[] body = getRandomBytes(bodyLength);
return new Message(id, groupId, timestamp, body);