Skip to content

Commit

Permalink
1433: increase memory size
Browse files Browse the repository at this point in the history
  • Loading branch information
f1sh1918 committed Jul 29, 2024
1 parent c630dec commit 6695e76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Argon2IdHasher {
.withIterations(2)
.withSalt(pepperByteArray)
.withParallelism(1)
.withMemoryAsKB(19)
.withMemoryAsKB(19456)
.build()

val generator = Argon2BytesGenerator()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class Argon2IdHasherTest {
assertEquals(Environment.getVariable("KOBLENZ_PEPPER"), "123456789ABC")

val hash = Argon2IdHasher.hashKoblenzUserData(KoblenzUser("Karla Koblenz", 12213, "123K"))
val expectedHash = "\$argon2id\$v=19\$m=19,t=2,p=1\$78SNlzz8llqPwetRlp8Lnag/WZGPc5XbimYbShpwVMQ" // This expected output was created with https://argon2.online/
val expectedHash = "\$argon2id\$v=19\$m=19456,t=2,p=1\$57YPIKvU/XE9h7/JA0tZFT2TzpwBQfYAW6K+ojXBh5w" // This expected output was created with https://argon2.online/
assertEquals(expectedHash, hash)
}
}
5 changes: 2 additions & 3 deletions docs/CreateKoblenzHash.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ Hash with Argon2id with the following parameters:
| Version | 19 |
| Iterations | 2 |
| Parallellism | 1 |
| Memory | 19 |
| Memory | 19456 (19MiB) |
| HashLength | 32 |
| Salt | Secret Salt will be shared with Koblenz<br/>for the example use `123456789ABC` |


### 4. The result...
...for the example data and example salt must be (output in encoded form with salt removed):

`$argon2id$v=19$m=19,t=2,p=1$78SNlzz8llqPwetRlp8Lnag/WZGPc5XbimYbShpwVMQ`

`$argon2id$v=19$m=19456,t=2,p=1$57YPIKvU/XE9h7/JA0tZFT2TzpwBQfYAW6K+ojXBh5w`

## Additional Information

Expand Down

0 comments on commit 6695e76

Please sign in to comment.