Ändeurngen

This commit is contained in:
ja
2022-02-07 08:54:25 +01:00
parent 3097539f1d
commit 4e7bcf6281
17 changed files with 178 additions and 274 deletions

View File

@@ -22,9 +22,9 @@ Public Class VERAG_VARIABLES
End Function
Shared Function getiterationnumber() As Integer
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
Return RandomInteger(Math.Pow(2, 2), (0.35 * GetCpuSpeed()))
Return RandomInteger(Math.Pow(2, 2), (0.55 * GetCpuSpeed()))
Else
Return RandomInteger(Math.Pow(2, 5), (0.34 * GetCpuSpeed()))
Return RandomInteger(Math.Pow(2, 3), (0.57 * GetMaxCpuSpeed()))
End If
End Function
@@ -55,7 +55,7 @@ Public Class VERAG_VARIABLES
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 8
Argon.DegreeOfParallelism = 28
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 3)
Argon.MemorySize = (((nIterations * 19.98 - (nIterations * 10.23) / 14 * 2) / 4.058) + 1 * 190)
Return Argon.GetBytes(nHash)