From 6a22da05d4c62f4534c5a8c06471b5a373fc8e71 Mon Sep 17 00:00:00 2001 From: ja Date: Fri, 17 Dec 2021 15:18:18 +0100 Subject: [PATCH] =?UTF-8?q?=C3=84ndeurngen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/TestPerformance.vb | 9 +++++---- Customers/Default2.aspx.vb | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/App_Code/TestPerformance.vb b/App_Code/TestPerformance.vb index 44ae28d..75aa904 100644 --- a/App_Code/TestPerformance.vb +++ b/App_Code/TestPerformance.vb @@ -21,7 +21,7 @@ Public Class TestPerformance Using con As New SqlConnection(ConnectionString) ' Using cmd As New SqlCommand("Validate_User") For nzahl As Integer = 0 To n Step 1 - Dim UsrID As Integer = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(0, 15), VERAG_VARIABLES.RandomInteger(500, 45750)) + Dim UsrID As Integer = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(0, 15), VERAG_VARIABLES.RandomInteger(500, 4500)), VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(1500, 4500), VERAG_VARIABLES.RandomInteger(4500, 45750))) Dim usrname As String = String.Empty Dim pw As String = "Pw" + Convert.ToBase64String(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(0, nzahl + 2))) Dim email As String = "ja@verag.ag" @@ -115,6 +115,7 @@ Public Class TestPerformance End Sub Public Shared finalzeit As Long + Public Shared Function TestHashrateServer(zahlint As Integer) As Byte() Dim arrkeys As New List(Of Byte()) Dim arrzahl As New List(Of Integer) @@ -129,14 +130,14 @@ Public Class TestPerformance Dim finalhash As Byte() For zahl As Integer = 0 To zahlint sw1.Start() - arrkeys.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 7)))) + arrkeys.Add(VERAG_VARIABLES.GenerateSalt(zahlint)) arrzahl_iterats.Add(VERAG_VARIABLES.getiterationnumber) - arrzahl.Add(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 8), Math.Pow(2, 7))) + arrzahl.Add(zahlint) sw1.Stop() arrzeitp1.Add(sw1.ElapsedMilliseconds) sw1.Reset() Next - Dim pw As String = "qVd$fS§564nS4" + Dim pw As String = "qV64nS4" For zahl As Integer = 0 To zahlint sw2.Start() hashbytes.Add(VERAG_VARIABLES.HashPassword(pw, arrkeys(zahl), arrzahl_iterats(zahl), arrzahl(zahl))) diff --git a/Customers/Default2.aspx.vb b/Customers/Default2.aspx.vb index aaba2ef..b51dcea 100644 --- a/Customers/Default2.aspx.vb +++ b/Customers/Default2.aspx.vb @@ -35,6 +35,6 @@ Partial Class Customers_Default2 End Sub Protected Sub btn_TesthashrateServer_ClickAsync(sender As Object, e As EventArgs) Handles btn_TesthashrateServer.Click - Dim pwhashresult As Byte() = TestPerformance.TestHashrateServer(VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 2), Math.Pow(2, 4)), VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 5)))) + Dim pwhashresult As Byte() = TestPerformance.TestHashrateServer(VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 2), Math.Pow(2, 5)), VERAG_VARIABLES.RandomInteger(Math.Pow(2, 6), Math.Pow(2, 7)))) End Sub End Class