Änderungen

This commit is contained in:
ja
2021-12-06 09:33:26 +01:00
parent 8f1a107877
commit 160b0b13a1

View File

@@ -34,7 +34,7 @@ Public Class VERAG_VARIABLES
Argon.Salt = salt Argon.Salt = salt
Argon.DegreeOfParallelism = 24 Argon.DegreeOfParallelism = 24
Argon.Iterations = nIterations Argon.Iterations = nIterations
Argon.MemorySize = (nIterations / 1.05) + 1 * 150 Argon.MemorySize = ((nIterations * 1 + nIterations / 2 * 2) / 1.05) + 1 * 150
Return Await Argon.GetBytesAsync(nHash) Return Await Argon.GetBytesAsync(nHash)
'Return Convert.ToBase64String(Argon.GetBytes(nHash)) 'Return Convert.ToBase64String(Argon.GetBytes(nHash))
'Return Argon.GetBytes(nHash) 'Return Argon.GetBytes(nHash)
@@ -42,11 +42,11 @@ Public Class VERAG_VARIABLES
'Using rfc2898DeriveBytes = New Rfc2898DeriveBytes(password, saltBytes, nIterations) 'Using rfc2898DeriveBytes = New Rfc2898DeriveBytes(password, saltBytes, nIterations)
'End Using 'End Using
Else Else
Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(password)) Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt Argon.Salt = salt
Argon.DegreeOfParallelism = 48 Argon.DegreeOfParallelism = 48
Argon.Iterations = nIterations Argon.Iterations = nIterations
Argon.MemorySize = (nIterations / 0.385) + 1 * 250 Argon.MemorySize = ((nIterations * 1 + nIterations / 2 * 2) / 0.08) + 1 * 170
Return Await Argon.GetBytesAsync(nHash) Return Await Argon.GetBytesAsync(nHash)
End If End If
End Function End Function