änderungen login speed und Default2- Admin test hash algorithmen

This commit is contained in:
ja
2022-02-08 10:23:51 +01:00
parent 5bed52aa10
commit 0ee22bff89
7 changed files with 74 additions and 75 deletions

View File

@@ -6,7 +6,7 @@ Partial Class login_FLEX
Private Customer_ID As String = String.Empty
Private UserNaMe As String = String.Empty
Private passw As String = String.Empty
Private USERID As String = String.Empty
Private salt As Byte()
Private intzahl As Integer
Public intzahliterats As Integer = -1
@@ -14,7 +14,6 @@ Partial Class login_FLEX
VERAG_VARIABLES.initerrorcount()
End Sub
Protected Async Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
intzahliterats = VERAG_VARIABLES.getiterationnumber
@@ -22,10 +21,10 @@ Partial Class login_FLEX
Try
Dim teststr = String.Empty
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 17))
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 15))
teststr = Await TestPerformance.TestHashrateServerAsync(0.052 * VERAG_VARIABLES.GetCpuSpeed())
Else
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 17))
intzahliterats = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 15))
teststr = Await TestPerformance.TestHashrateServerAsync(0.052 * VERAG_VARIABLES.GetCpuSpeed())
End If
If String.Equals(teststr, String.Empty) = False Then
@@ -217,7 +216,7 @@ Partial Class login_FLEX
End If
If String.Equals(tb3.Text, dr("Password")) = True Then
intzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(95, 200), Math.Pow(2, 8))
intzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(95, 210), Math.Pow(2, 8))
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
@@ -448,6 +447,7 @@ Partial Class login_FLEX
Protected Sub CreateTestusers_Click(sender As Object, e As EventArgs)
Dim str As String = String.Empty
Dim textbox As TextBox = Page.FindControl("txt_numbuserstes")
str = textbox.Text
TestPerformance.createnUsers(Integer.Parse(str))