Imports Konscious.Security.Cryptography Partial Class Customers_Default2 Inherits System.Web.UI.Page Dim nIterations As Integer = VERAG_VARIABLES.getiterationnumber Protected Sub Page_Load(ByVal sender As Object, e As EventArgs) Handles Me.Load If Page.IsPostBack Then Page.MaintainScrollPositionOnPostBack = True VERAG_VARIABLES.initerrorcount() Else Page.MaintainScrollPositionOnPostBack = False VERAG_VARIABLES.initerrorcount() End If End Sub Protected Sub Button1_Click(sender As Object, e As EventArgs) If String.IsNullOrEmpty(TextBox1.Text) = False And String.IsNullOrEmpty(TextBox2.Text) = False Then VERAG_VARIABLES.initerrorcount() Dim vals As New List(Of String) Dim finalstr As String = "" For i As Integer = Integer.Parse(TextBox1.Text) + 1 To Integer.Parse(TextBox2.Text) Dim strtemp As String = "" VERAG_VARIABLES.seterrorcount(Integer.Parse(i)) vals.Add(i.ToString + Space(3) + ":" + Space(3) + VERAG_VARIABLES.geterrornumb) Next For Each val As String In vals finalstr = finalstr + Environment.NewLine + val + Environment.NewLine Next Label2.Text = finalstr End If If String.IsNullOrEmpty(txt_Fehlercode.Text) = False Then Dim finalstr As String = String.Empty finalstr = VERAG_VARIABLES.getErrorcodeindez(txt_Fehlercode.Text) txt_Fehlercodezuzahl.Text = finalstr End If End Sub Protected Sub btn_TesthashrateServer_ClickAsync(sender As Object, e As EventArgs) Handles btn_TesthashrateServer.Click Dim Boole As Boolean = New Boolean Dim ram As Double = Double.Parse(My.Computer.Info.TotalPhysicalMemory.ToString) Dim MemorySizelocal = ((nIterations * 4.98 - (nIterations * 1.23) / 4 * 1.5) / 1.05) + 1 * 290 Dim MemorySizeProductionServ = ((nIterations * 8.485 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416 If MemorySizelocal < ram And HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then Dim pwhashresult As Byte() = TestPerformance.TestHashrateServer(VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 0), Math.Pow(2, 3)), VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 6)))) Boole = True ElseIf MemorySizeProductionServ < ram And Not HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then 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, 5), Math.Pow(2, 7)))) Boole = True Else Boole = False End If If Boole = True Then lbl_Status.Text = "Der Test wurde erfolgreich bestanden!" ElseIf Boole = False AndAlso HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then lbl_Status.Text = "Test fehlgeschlagen! Es fehlen mindestens " + MemorySizelocal - ram + "Bytes RAM!" ElseIf Boole = False AndAlso Not HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then lbl_Status.Text = "Test fehlgeschlagen! Es fehlen mindestens " + MemorySizeProductionServ - ram + "Bytes RAM!" End If End Sub End Class