Skip to content

Commit

Permalink
Encrypt messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nonononoki committed Mar 2, 2020
1 parent 786bdaf commit a2eaea1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/nonononoki/alovoa/entity/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

import java.util.Date;

import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import com.nonononoki.alovoa.component.TextEncryptorConverter;

import lombok.Data;

@Data
Expand All @@ -27,6 +30,7 @@ public class Message{
@ManyToOne
private User userTo;

@Convert(converter = TextEncryptorConverter.class)
private String content;
private Date creationDate;

Expand Down

0 comments on commit a2eaea1

Please sign in to comment.