mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 05:18:04 +01:00
Convert VerificationCode to a record
This commit is contained in:
committed by
Jon Chambers
parent
5c4c729703
commit
43d91e5bd6
@@ -186,7 +186,7 @@ public class DeviceController {
|
||||
|
||||
VerificationCode verificationCode = generateVerificationCode();
|
||||
StoredVerificationCode storedVerificationCode =
|
||||
new StoredVerificationCode(verificationCode.getVerificationCode(), System.currentTimeMillis(), null, null);
|
||||
new StoredVerificationCode(verificationCode.verificationCode(), System.currentTimeMillis(), null, null);
|
||||
|
||||
pendingDevices.store(account.getNumber(), storedVerificationCode);
|
||||
|
||||
@@ -281,7 +281,7 @@ public class DeviceController {
|
||||
VerificationCode generateVerificationCode() {
|
||||
SecureRandom random = new SecureRandom();
|
||||
int randomInt = 100000 + random.nextInt(900000);
|
||||
return new VerificationCode(randomInt);
|
||||
return new VerificationCode(String.valueOf(randomInt));
|
||||
}
|
||||
|
||||
private Mac getInitializedMac() {
|
||||
|
||||
Reference in New Issue
Block a user