Änderungen GUI und Algorithmus

This commit is contained in:
ja
2021-12-03 13:17:29 +01:00
parent 17f4d7faad
commit 39e94f95b7
4 changed files with 6 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ Public Class VERAG_VARIABLES
Public Shared Async Function HashPassword(ByVal password As String, ByVal salt As Byte(), ByVal nIterations As Integer, ByVal nHash As Integer) As Threading.Tasks.Task(Of Byte())
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(password))
Argon.Salt = salt
Argon.DegreeOfParallelism = 6
Argon.DegreeOfParallelism = 4
Argon.Iterations = nIterations
Argon.MemorySize = 4096
Return Await Argon.GetBytesAsync(nHash)
@@ -45,7 +45,6 @@ Public Class VERAG_VARIABLES
Dim newHash As Byte() = Await HashPassword(passw, salt, nIterations, nHash)
Return hash.SequenceEqual(newHash)
End Function
Public Shared Function RandomInteger(ByVal min As Integer, ByVal _
max As Integer) As Integer
Dim rand As New RNGCryptoServiceProvider()

View File

@@ -181,19 +181,19 @@
</div>
<div id="rowcols5" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
<asp:Label ID="lbl_absender_M" runat="server" style="color:#043381" Font-Size="1em">Absender:</asp:Label>
<asp:TextBox ID="txt_Absender_M" runat="server" style="width:155px;margin-left:100px"></asp:TextBox>
<asp:TextBox ID="txt_Absender_M" runat="server" style="width:155px;margin-left:92px"></asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="txt_Absender_M" runat="server" style="width:155px;margin-left:18px" Enabled="false" ID="req_txt_Absender_M" ErrorMessage="" ForeColor="Red"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_Absender_M" runat="server" ID="regex_txt_Absender_M" Enabled="false" ValidationExpression="[^!,]{2,90}" ForeColor="Red" SetFocusOnError="true" Display="Dynamic" ErrorMessage="Wrong Input! Try again!"></asp:RegularExpressionValidator>
</div>
<div id="rowcols8" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
<asp:Label ID="lbl_Empfaenger_M" runat="server" style="color:#043381" Font-Size="1em">Empfänger</asp:Label>
<asp:TextBox ID="txt_Empfaenger_M" runat="server" style="width:155px;margin-left:91px"></asp:TextBox>
<asp:TextBox ID="txt_Empfaenger_M" runat="server" style="width:155px;margin-left:84px"></asp:TextBox>
<asp:RequiredFieldValidator ControlToValidate="txt_Empfaenger_M" runat="server" ID="reqval_txt_Empfaenger_M" ForeColor="Red" Enabled="false" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_Empfaenger_M" ID="regex_txt_Empaenger_M" runat="server" ForeColor="Red" Enabled="false" ValidationExpression="[^!,]{2,90}" Display="Dynamic" style="width:105px;margin-left:13px" SetFocusOnError="true" ErrorMessage="Error! Try again!"></asp:RegularExpressionValidator>
</div>
<div id="rowcol6" class="row-cols-1" style="margin-right:/*1.52px;*/0.33480176211453744vw;">
<asp:Label ID="lbl_ReNr_M" runat="server" style="color:#043381" Font-Size="1em">Rechnungs-Nummer:</asp:Label>
<asp:TextBox ID="txt_ReNr_M" runat="server" style="width:155px;margin-left:5px"></asp:TextBox>
<asp:TextBox ID="txt_ReNr_M" runat="server" style="width:155px;margin-left:7px"></asp:TextBox>
<asp:RequiredFieldValidator Enabled="false" ControlToValidate="txt_ReNr_M" runat="server" Display="Dynamic" ForeColor="Red" ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_ReNr_M" runat="server" ID="regex_txt_ReNr_M" ForeColor="Red" Display="Dynamic" ValidationExpression="[0-9]{1,8}" Enabled="false" ErrorMessage="Please stay in the range of 8 numbers!"></asp:RegularExpressionValidator>
</div>

View File

@@ -39,8 +39,7 @@
// Code, der ausgeführt wird, wenn eine Sitzung beendet wird.
// Hinweis: Das Ereignis "Session_End" wird nur ausgelöst, wenn der Modus "sessionstate"
// in der Datei "Web.config" auf "InProc" festgelegt ist. Wenn der Sitzungsmodus auf "StateServer"
// oder "SQLServer" festgelegt ist, wird das Ereignis nicht ausgelöst.
// oder "SQLServer" festgelegt ist, wird das Ereignis nicht ausgelöst.
Session.Remove("TokenforEmail");
Session.Remove("SessID");
Session.Remove("CustomerID");

View File

@@ -2,6 +2,7 @@
Imports System.Data.SqlClient
Imports System.Security.Cryptography
Imports System.Threading.Tasks
Imports Konscious.Security.Cryptography
Partial Class login_Change_PW
Inherits System.Web.UI.Page