Änderungen Hash

This commit is contained in:
ja
2022-01-14 16:13:47 +01:00
parent a42dbb350c
commit 89bfccffd5
3 changed files with 1697 additions and 1673 deletions

View File

@@ -129,7 +129,7 @@ Public Class TestPerformance
For zahl As Integer = 0 To zahlint
sw1.Start()
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 10))))
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 8))))
arrzahl_iterats.Add(VERAG_VARIABLES.getiterationnumber)
arrzahl.Add(zahlint)
sw1.Stop()
@@ -178,9 +178,9 @@ Public Class TestPerformance
For zahl As Integer = 0 To zahlint
sw1.Start()
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 10))))
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 7))))
Else
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 10))))
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 8))))
End If
arrzahl_iterats.Add(VERAG_VARIABLES.getiterationnumber)
arrzahl.Add(zahlint)

View File

@@ -24,13 +24,13 @@ Partial Class login_FLEX
Dim teststr = String.Empty
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 7), Math.Pow(2, 11))
teststr = Await TestPerformance.TestHashrateServerAsync(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 7), Math.Pow(2, 10)))
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 7), Math.Pow(2, 10))
teststr = Await TestPerformance.TestHashrateServerAsync(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 10)))
Else
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 10), Math.Pow(2, 17))
teststr = Await TestPerformance.TestHashrateServerAsync(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 7), Math.Pow(2, 10)))
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 10), Math.Pow(2, 12))
teststr = Await TestPerformance.TestHashrateServerAsync(VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 10)))
End If
If String.Equals(teststr, String.Empty) = False Then
intzahliterats = VERAG_VARIABLES.getiterationnumber
@@ -258,7 +258,7 @@ Partial Class login_FLEX
Login1.FailureText = VERAG_VARIABLES.geterrornumb + "Username is not in the database!"
End If
If String.Equals(tb3.Text, dr("Password")) = True Then
intzahl = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 10))
intzahl = VERAG_VARIABLES.RandomInteger(95, Math.Pow(2, 10))
salt = VERAG_VARIABLES.GenerateSalt(intzahl)
Dim hashpw As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(passw, salt, intzahliterats, intzahl)
If Await VERAG_VARIABLES.VerifyhashAsync(dr("Password").ToString, salt, hashpw, intzahliterats, intzahl) = True Then