]> nmode's Git Repositories - signal-cli/commitdiff
Fix pin hash version to match android
authorAsamK <asamk@gmx.de>
Sun, 10 Jan 2021 17:14:33 +0000 (18:14 +0100)
committerAsamK <asamk@gmx.de>
Sun, 10 Jan 2021 17:16:42 +0000 (18:16 +0100)
CHANGELOG.md
src/main/java/org/asamk/signal/manager/util/PinHashing.java

index df9aa47ff648795cd7a6e71cbbfac0405176c3d5..1af850b13bac1979a1ad333620959cbb5c471eca 100644 (file)
@@ -4,6 +4,8 @@
 
 ### Fixed
 - Disable registration lock before removing the PIN
+- Fix PIN hash version to match the official clients.
+  If you had previously set a PIN you need to set it again to be able to unlock the registration lock later.
 
 ## [0.7.2] - 2020-12-31
 ### Added
index 2adf8148831c4bfaf1f1a65fb23618e56e3e6218..2fd2d80295fafbada2a2a472258d74c6b3e5b593 100644 (file)
@@ -14,7 +14,7 @@ public final class PinHashing {
     public static HashedPin hashPin(String pin, KeyBackupService.HashSession hashSession) {
         final Argon2Parameters params = new Argon2Parameters.Builder(Argon2Parameters.ARGON2_id).withParallelism(1)
                 .withIterations(32)
-                .withVersion(13)
+                .withVersion(Argon2Parameters.ARGON2_VERSION_13)
                 .withMemoryAsKB(16 * 1024)
                 .withSalt(hashSession.hashSalt())
                 .build();