PW zum Testen der Serverfunktion wird nun dynamisch generiert bei jedem Neustart der Session.
This commit is contained in:
@@ -129,14 +129,14 @@ Public Class TestPerformance
|
|||||||
|
|
||||||
For zahl As Integer = 0 To zahlint
|
For zahl As Integer = 0 To zahlint
|
||||||
sw1.Start()
|
sw1.Start()
|
||||||
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 8))))
|
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 6))))
|
||||||
arrzahl_iterats.Add(VERAG_VARIABLES.getiterationnumber)
|
arrzahl_iterats.Add(VERAG_VARIABLES.getiterationnumber)
|
||||||
arrzahl.Add(zahlint)
|
arrzahl.Add(zahlint)
|
||||||
sw1.Stop()
|
sw1.Stop()
|
||||||
arrzeitp1.Add(sw1.ElapsedMilliseconds)
|
arrzeitp1.Add(sw1.ElapsedMilliseconds)
|
||||||
sw1.Reset()
|
sw1.Reset()
|
||||||
Next
|
Next
|
||||||
Dim pw As String = "q!V64nS4"
|
Dim pw As String = "PasswordV" + VERAG_VARIABLES.RandomInteger(5, zahlint - 5).ToString + "!!%"
|
||||||
For zahl As Integer = 0 To zahlint
|
For zahl As Integer = 0 To zahlint
|
||||||
sw2.Start()
|
sw2.Start()
|
||||||
hashbytes.Add(VERAG_VARIABLES.HashPassword(pw, hashsalts(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))
|
hashbytes.Add(VERAG_VARIABLES.HashPassword(pw, hashsalts(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))
|
||||||
@@ -184,7 +184,7 @@ Public Class TestPerformance
|
|||||||
arrzeitp1.Add(sw1.ElapsedMilliseconds)
|
arrzeitp1.Add(sw1.ElapsedMilliseconds)
|
||||||
sw1.Reset()
|
sw1.Reset()
|
||||||
Next
|
Next
|
||||||
Dim pw As String = "q!V64nS4"
|
Dim pw As String = "PasswordV" + VERAG_VARIABLES.RandomInteger(5, zahlint - 5).ToString + "!!%"
|
||||||
For zahl As Integer = 0 To zahlint
|
For zahl As Integer = 0 To zahlint
|
||||||
sw2.Start()
|
sw2.Start()
|
||||||
hashbytes.Add(Await VERAG_VARIABLES.HashPasswordAsync(pw, hashsalts(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))
|
hashbytes.Add(Await VERAG_VARIABLES.HashPasswordAsync(pw, hashsalts(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ Public Class VERAG_VARIABLES
|
|||||||
Else
|
Else
|
||||||
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
|
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
|
||||||
Argon.Salt = salt
|
Argon.Salt = salt
|
||||||
Argon.DegreeOfParallelism = 24 * (nHash / nHash * 1.03)
|
Argon.DegreeOfParallelism = 28
|
||||||
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 3)
|
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5)
|
||||||
Argon.MemorySize = (((nIterations * 8.485 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
|
Argon.MemorySize = (((nIterations * 6.685 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
|
||||||
Return Argon.GetBytes(nHash)
|
Return Argon.GetBytes(nHash)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -65,12 +65,11 @@ Public Class VERAG_VARIABLES
|
|||||||
Else
|
Else
|
||||||
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
|
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
|
||||||
Argon.Salt = salt
|
Argon.Salt = salt
|
||||||
Argon.DegreeOfParallelism = 24 * (nHash / nHash * 1.03)
|
Argon.DegreeOfParallelism = 28
|
||||||
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 3)
|
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5)
|
||||||
Argon.MemorySize = (((nIterations * 8.485 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
|
Argon.MemorySize = (((nIterations * 6.685 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
|
||||||
Return Await Argon.GetBytesAsync(nHash)
|
Return Await Argon.GetBytesAsync(nHash)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function Verifyhash(ByVal passw As String, salt As Byte(), ByVal hash As Byte(), ByVal nIterations As Integer, ByVal nHash As Integer) As Boolean
|
Public Shared Function Verifyhash(ByVal passw As String, salt As Byte(), ByVal hash As Byte(), ByVal nIterations As Integer, ByVal nHash As Integer) As Boolean
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user