Änderungen Testperformance script
This commit is contained in:
@@ -130,14 +130,14 @@ Public Class TestPerformance
|
||||
Dim finalhash As Byte()
|
||||
For zahl As Integer = 0 To zahlint
|
||||
sw1.Start()
|
||||
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(arrzahl(zahl)))
|
||||
hashsalts.Add(VERAG_VARIABLES.GenerateSalt(VERAG_VARIABLES.RandomInteger(Math.Pow(2, 1), Math.Pow(2, 5))))
|
||||
arrzahl_iterats.Add(VERAG_VARIABLES.getiterationnumber)
|
||||
arrzahl.Add(zahlint)
|
||||
sw1.Stop()
|
||||
arrzeitp1.Add(sw1.ElapsedMilliseconds)
|
||||
sw1.Reset()
|
||||
Next
|
||||
Dim pw As String = "qV64nS4"
|
||||
Dim pw As String = "q!V64nS4"
|
||||
For zahl As Integer = 0 To zahlint
|
||||
sw2.Start()
|
||||
hashbytes.Add(VERAG_VARIABLES.HashPassword(pw, hashsalts(zahl), arrzahl_iterats(zahl), arrzahl(zahl)))
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<tr><td>
|
||||
<tr><td><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></td></tr>
|
||||
<tr><td><asp:Button ID="btn_TesthashrateServer" runat="server" Font-Overline="false" BorderStyle="Dashed" ClientIDMode="AutoID" OnClick="btn_TesthashrateServer_ClickAsync" Text="Test hashrate of Server!" /></td></tr>
|
||||
</table>
|
||||
<tr><td><asp:Label runat="server" ID="lbl_Status" Text="Hier wird das Ergebnis des Benchmark Tests angezeigt!"></asp:Label></td></tr></table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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
|
||||
@@ -35,6 +36,27 @@ 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, 5)), VERAG_VARIABLES.RandomInteger(Math.Pow(2, 6), Math.Pow(2, 7))))
|
||||
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
|
||||
|
||||
@@ -310,8 +310,11 @@
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function doPostBack(id,strtemp) {
|
||||
|
||||
function doPostBack(id,nat, strtemp) {
|
||||
let Speditionslabel = document.getElementById("<%=lbl_sped_Placeholder.ClientID%>")
|
||||
let natplaceholder = document.getElementById("<%=lbl_Placeholder.ClientID%>")
|
||||
Speditionslabel.textContent = id.split(',')[0];
|
||||
natplaceholder.textContent = nat;
|
||||
const obj = JSON.parse(strtemp);
|
||||
|
||||
for (let i = 0; i <= obj.length; i++) {
|
||||
|
||||
@@ -147,7 +147,7 @@ Partial Class LKWS
|
||||
tc_gueltigbis.Text = l2.GültigBis.ToString
|
||||
tc_Karten_Nr.Text = l2.KartenNr.ToString
|
||||
|
||||
If String.Equals(l2.KfzKennzeichen, l1.KfzKennzeichen) = True Then
|
||||
If String.Equals(l2.KfzKennzeichen.ToString, l1.KfzKennzeichen.ToString) = True Then
|
||||
tr.Cells.Add(tc_SDL)
|
||||
tr.Cells.Add(tc_Bez)
|
||||
tr.Cells.Add(tc_gueltigbis)
|
||||
@@ -160,13 +160,13 @@ Partial Class LKWS
|
||||
|
||||
'MsgBox(TableRows.Count.ToString)
|
||||
Next
|
||||
If String.IsNullOrEmpty(l1.Nationalität) = True Then
|
||||
If IsNothing(l1.Nationalität) = True Then
|
||||
strtemp2 = "Keine Angabe"
|
||||
Else
|
||||
strtemp2 = l1.Nationalität
|
||||
End If
|
||||
|
||||
tr1.Attributes.Add("onclick", "Javascript:doPostBack('""" & tr1.Cells.Item(0).Text & """,""" & ConvertToJSON(list3) & """')")
|
||||
tr1.Attributes.Add("onclick", "Javascript:doPostBack('""" + tr1.Cells.Item(0).Text + """,""" + strtemp2 + """,""" + ConvertToJSON(list3) + """')")
|
||||
cnt += 1
|
||||
tbl_sidemenue.Rows.Add(tr1)
|
||||
Next
|
||||
@@ -203,6 +203,7 @@ Partial Class LKWS
|
||||
Dim tblhrow As TableHeaderRow = New TableHeaderRow()
|
||||
Dim cnt As Integer = 0
|
||||
Dim list3 As List(Of String) = New List(Of String)
|
||||
|
||||
tblhrow.Cells.Add(tbhc_KFZKennz)
|
||||
tblhrow.Cells.Add(tbhc_Nat)
|
||||
tblhrow.Cells.Add(tblhc_Verk)
|
||||
@@ -221,6 +222,12 @@ Partial Class LKWS
|
||||
tc_KfzKennz.Text = l2.KfzKennzeichen.ToString
|
||||
tr2.Cells.Add(tc_KfzKennz)
|
||||
Dim list5 = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, l2.KfzKennzeichen)
|
||||
Dim strtempnat As String = String.Empty
|
||||
If IsNothing(l2.Nationalität) = True Then
|
||||
strtempnat = "Keine Angabe!"
|
||||
Else
|
||||
strtempnat = l2.Nationalität.ToString
|
||||
End If
|
||||
tc_Nationalitaet.Text = String.Empty
|
||||
tr2.Cells.Add(tc_Nationalitaet)
|
||||
Dim cbVerk_Such As CheckBox = New CheckBox()
|
||||
@@ -242,7 +249,7 @@ Partial Class LKWS
|
||||
If IsNothing(l2.Vermerk) = True Then
|
||||
tc_Vermerk.Text = String.Empty
|
||||
ElseIf l2.Vermerk.ToString = String.Empty Then
|
||||
tc_Vermerk.Text = String.Empty
|
||||
tc_Vermerk.Text = "Keine Anagben!"
|
||||
Else
|
||||
tc_Vermerk.Text = l2.Vermerk.ToString
|
||||
End If
|
||||
@@ -258,8 +265,8 @@ Partial Class LKWS
|
||||
list3.Add(l5.SDLNr.ToString + "," + strstrtemp + "," + l5.GültigBis.ToString + "," + l5.KartenNr)
|
||||
Next
|
||||
initcells(tblhrow, tbhc_KFZKennz, tbhc_Nat, tblhc_Verk, tblhc_Kz, tblhc_Verm, tr2, tc_KfzKennz, tc_Nationalitaet, tc_Verk, tc_KZ_An, tc_Vermerk, cnt)
|
||||
tr2.Attributes.Add("onclick", "Javascript:doPostBack('""" & tr2.Cells.Item(0).Text & """,""" & ConvertToJSON(list3) & """')")
|
||||
tbl_sidemenue.Rows.Add(tr2)
|
||||
tr2.Attributes.Add("onclick", "Javascript:doPostBack('""" + tr2.Cells.Item(0).Text + """,""" + strtempnat + """,""" + ConvertToJSON(list3) + """')")
|
||||
tbl_sidemenue.Rows.Add(tr2)
|
||||
cnt += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
@@ -115,8 +115,8 @@ Partial Class login_FLEX
|
||||
reqfieldvalpassw_M.Enabled = False
|
||||
reqfieldvalpassw.Validate()
|
||||
If reqfieldvalpassw.IsValid = True Then
|
||||
intzahl = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 7), Math.Pow(2, 10))
|
||||
Dim hashpw1 As Byte() = VERAG_VARIABLES.HashPassword(tb3_M.Text, salt, intzahliterats, intzahl)
|
||||
intzahl = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 6), Math.Pow(2, 10))
|
||||
Dim hashpw1 As Byte() = VERAG_VARIABLES.HashPassword(tb3.Text, salt, intzahliterats, intzahl)
|
||||
passw = tb3.Text
|
||||
End If
|
||||
End If
|
||||
@@ -127,6 +127,7 @@ Partial Class login_FLEX
|
||||
intzahl = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 6), Math.Pow(2, 10))
|
||||
Dim hashpw1_M As Byte() = VERAG_VARIABLES.HashPassword(tb3_M.Text, salt, intzahliterats, intzahl)
|
||||
If reqfieldvalpassw_M.IsValid = True Then
|
||||
Dim hashpw_M As Byte() = VERAG_VARIABLES.HashPassword(tb3_M.Text, salt, intzahliterats, intzahl)
|
||||
passw = tb3_M.Text
|
||||
Else
|
||||
VERAG_VARIABLES.seterrorcount(4)
|
||||
|
||||
Reference in New Issue
Block a user