From d6b8a8b92fa77fdcb2b007ec169212d8a79e9e8c Mon Sep 17 00:00:00 2001 From: ja Date: Thu, 16 Dec 2021 15:26:52 +0100 Subject: [PATCH] Asnyc login --- App_Code/VERAG_VARIABLES.vb | 6 +++--- login/login_FLEX.aspx.vb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/App_Code/VERAG_VARIABLES.vb b/App_Code/VERAG_VARIABLES.vb index e3eed13..ed719bf 100644 --- a/App_Code/VERAG_VARIABLES.vb +++ b/App_Code/VERAG_VARIABLES.vb @@ -35,7 +35,7 @@ Public Class VERAG_VARIABLES Argon.Salt = salt Argon.DegreeOfParallelism = 24 Argon.Iterations = nIterations - Argon.MemorySize = (((nIterations * 1 - nIterations / 4 * 2) / 1.05) + 1 * 150) + Argon.MemorySize = (((nIterations * 1 - nIterations * 3 / 4 * 2) / 1.05) + 1 * 150) 'Return Convert.ToBase64String(Argon.GetBytes(nHash)) 'Return Argon.GetBytes(nHash) @@ -47,8 +47,8 @@ Public Class VERAG_VARIABLES Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password))) Argon.Salt = salt Argon.DegreeOfParallelism = 36 - Argon.Iterations = nIterations - Argon.MemorySize = ((((nIterations * 4 - nIterations / 1.95 * 2.28) / 0.08) + 1 * 256) / 2) + Argon.Iterations = nIterations * 1.2 + Argon.MemorySize = (((nIterations * 4 - (nIterations * 1.2) / 1.95 * 2.28) / 0.08) + 1 * 256) / 2 Return Await Argon.GetBytesAsync(nHash) End If diff --git a/login/login_FLEX.aspx.vb b/login/login_FLEX.aspx.vb index 607e48a..1d2554e 100644 --- a/login/login_FLEX.aspx.vb +++ b/login/login_FLEX.aspx.vb @@ -21,7 +21,7 @@ Partial Class login_FLEX Page.MaintainScrollPositionOnPostBack = False End If End Sub - Protected Async Sub ValidateUser(sender As Object, e As EventArgs) + Protected Async Function ValidateUser(sender As Object, e As EventArgs) As Threading.Tasks.Task Dim ConnectionString = "" If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True @@ -205,7 +205,7 @@ Partial Class login_FLEX FormsAuthentication.RedirectFromLoginPage(UserNaMe, True) - End Sub + End Function Protected Sub LoginButton_Click(sender As Object, e As EventArgs) Validate("Login")