Anpassungen an Serversettings vs localhost Hosting bzgl Sicherheit
This commit is contained in:
@@ -177,14 +177,23 @@ 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))))
|
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
||||||
|
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 8))))
|
||||||
|
Else
|
||||||
|
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 6), Math.Pow(2, 10))))
|
||||||
|
End If
|
||||||
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 = "PasswordV" + VERAG_VARIABLES.RandomInteger(5, zahlint - 5).ToString + "!!%"
|
Dim pw As String
|
||||||
|
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
|
||||||
|
pw = "PasswordV" + VERAG_VARIABLES.RandomInteger(5, zahlint - 5).ToString + "!!%"
|
||||||
|
Else
|
||||||
|
pw = "&WAS5$WdAG&" + VERAG_VARIABLES.RandomInteger(55, zahlint - VERAG_VARIABLES.RandomInteger(5, 87)).ToString + "#*p(=+UY"
|
||||||
|
End If
|
||||||
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)))
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -19,8 +19,14 @@ Partial Class login_FLEX
|
|||||||
Else
|
Else
|
||||||
Try
|
Try
|
||||||
Dim teststr = String.Empty
|
Dim teststr = String.Empty
|
||||||
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 5), Math.Pow(2, 13))
|
|
||||||
teststr = Await TestPerformance.TestHashrateServerAsync(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 3), Math.Pow(2, 7)))
|
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(2, Math.Pow(2, 10)))
|
||||||
|
Else
|
||||||
|
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 14))
|
||||||
|
teststr = Await TestPerformance.TestHashrateServerAsync(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 5), Math.Pow(2, 11)))
|
||||||
|
End If
|
||||||
If String.Equals(teststr, String.Empty) = False Then
|
If String.Equals(teststr, String.Empty) = False Then
|
||||||
intzahliterats = VERAG_VARIABLES.getiterationnumber
|
intzahliterats = VERAG_VARIABLES.getiterationnumber
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user