A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
565 B

  1. package org.ros.chatto.dto;
  2. import java.util.Date;
  3. import javax.validation.constraints.NotBlank;
  4. import javax.validation.constraints.Pattern;
  5. import javax.validation.constraints.Size;
  6. import org.ros.chatto.model.MessageCipher;
  7. import lombok.Data;
  8. @Data
  9. public class ReencryptionDTO {
  10. @NotBlank(message = "Username should not be blank")
  11. @Pattern(regexp = "^[A-Za-z0-9]+$", message = "Username must be alphanumeric")
  12. @Size(max=15)
  13. private String toUser, fromUser;
  14. @NotBlank
  15. @Size(max=600)
  16. private MessageCipher messageCipher;
  17. private Date messageTime;
  18. }