Änderungen Algorithmus Serverlast senken und Produktivität steigern. Und GUI Anpassungen Mobil.

This commit is contained in:
ja
2021-12-03 15:34:56 +01:00
parent 39e94f95b7
commit d833a5dcff
5 changed files with 51 additions and 33 deletions

View File

@@ -11,11 +11,12 @@ Imports System.Security.Cryptography
Partial Class ForgotPW
Inherits System.Web.UI.Page
Dim ConnectionString As String = String.Empty
Dim salt As String = String.Empty
Dim salt As Byte()
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
VERAG_VARIABLES.initerrorcount()
salt = VERAG_VARIABLES.GenerateSalt(RandomInteger(Math.Pow(2, 3), Math.Pow(2, 10)))
Else
Page.MaintainScrollPositionOnPostBack = False
VERAG_VARIABLES.initerrorcount()
@@ -26,7 +27,7 @@ Partial Class ForgotPW
End Sub
Protected Sub btn_Send_Click(sender As Object, e As EventArgs)
Protected Async Sub btn_Send_Click(sender As Object, e As EventArgs)
Try
Dim username As String = String.Empty
Dim password As String = String.Empty
@@ -213,7 +214,9 @@ Partial Class ForgotPW
Else
tokenname = Session.Item("TokenforEmail")
End If
Dim intzahl As Integer = VERAG_VARIABLES.RandomInteger(Math.Pow(2, 4), Math.Pow(2, 10))
Dim hashdata As Byte() = Await VERAG_VARIABLES.HashPassword(tokenname, salt, VERAG_VARIABLES.getiterationnumber, intzahl)
Session.Add("TokenHashtokenized", VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(Convert.ToBase64String(hashdata)))
If SendEmail(username, password, email, tokenname, customerID, isusrnmright, isCustomeridright, isemailright, Session.IsNewSession, UserID) = True Then
'password = RandomString(New Random, 10)
If (getDateoftoken(tokenname) = True) Then