Changed Token size from 64 chars -> 16
parent
984912ab70
commit
b1cb69080a
|
@ -37,7 +37,11 @@ public class Account {
|
|||
@GenericGenerator(name = "uuid", strategy ="org.hibernate.id.UUIDGenerator")
|
||||
@Type(type = "uuid-char")
|
||||
private UUID guid;
|
||||
|
||||
|
||||
private String name;
|
||||
|
||||
@Column(length = Relay.TOKEN_NUM_CHARS)
|
||||
private String token;
|
||||
|
||||
@ElementCollection(fetch = FetchType.EAGER)
|
||||
|
|
|
@ -20,7 +20,9 @@ import java.util.UUID;
|
|||
@Service
|
||||
public class Relay {
|
||||
|
||||
public static final int TOKEN_NUM_BITS = 256;
|
||||
public static final int TOKEN_NUM_BITS = 64;
|
||||
public static final int TOKEN_NUM_CHARS = TOKEN_NUM_BITS / 4;
|
||||
|
||||
private final Random RANDOM = new SecureRandom();
|
||||
|
||||
private final AccountRepository accountRepository;
|
||||
|
|
Loading…
Reference in New Issue