Änderungen codegenierung und verhashung pw

This commit is contained in:
ja
2021-12-22 13:30:36 +01:00
parent a833f5a7f6
commit 1f4b9a7029
5 changed files with 20 additions and 20 deletions

View File

@@ -4,7 +4,7 @@ Imports Konscious.Security.Cryptography
Public Class VERAG_VARIABLES
Public Shared errornumb As Integer = 0
Shared Function getiterationnumber() As Integer
Return RandomInteger(Math.Pow(2, 4), Math.Pow(2, 10))
Return RandomInteger(Math.Pow(2, 5), Math.Pow(2, 10))
End Function
Shared Sub initerrorcount()
@@ -35,15 +35,15 @@ Public Class VERAG_VARIABLES
Argon.Salt = salt
Argon.DegreeOfParallelism = 24
Argon.Iterations = nIterations * 2
Argon.MemorySize = (((nIterations * 2.98 - (nIterations * 1.23) / 4 * 1.5) / 1.05) + 1 * 290)
Argon.MemorySize = (((nIterations * 4.98 - (nIterations * 1.23) / 4 * 1.5) / 1.05) + 1 * 290)
Return Argon.GetBytes(nHash)
Else
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = GenerateSalt(nHash)
Argon.DegreeOfParallelism = 48
Argon.Iterations = nIterations * 3
Argon.MemorySize = (((nIterations * 2.485 - (nIterations * 0.56) / 1.85 * 2.28) / 5.18) + 1.024 * 416)
Argon.Salt = salt
Argon.DegreeOfParallelism = 50
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 3)
Argon.MemorySize = (((nIterations * 8.485 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
Return Argon.GetBytes(nHash)
End If