Änderungen Email bei fehler an mich und Iterationsalgorithmus optimiert bei Hashfunktion sowie der PW Token generierungen

This commit is contained in:
ja
2021-12-16 16:27:34 +01:00
parent d6b8a8b92f
commit e0a200ecdd
2 changed files with 7 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ Public Class VERAG_VARIABLES
Argon.Salt = salt Argon.Salt = salt
Argon.DegreeOfParallelism = 24 Argon.DegreeOfParallelism = 24
Argon.Iterations = nIterations Argon.Iterations = nIterations
Argon.MemorySize = (((nIterations * 1 - nIterations * 3 / 4 * 2) / 1.05) + 1 * 150) Argon.MemorySize = (((nIterations * 1 - (nIterations * 1.23) / 4 * 2) / 1.05) + 1 * 160)
'Return Convert.ToBase64String(Argon.GetBytes(nHash)) 'Return Convert.ToBase64String(Argon.GetBytes(nHash))
'Return Argon.GetBytes(nHash) 'Return Argon.GetBytes(nHash)
@@ -46,9 +46,9 @@ Public Class VERAG_VARIABLES
Else Else
Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password))) Dim Argon As Argon2d = New Argon2d(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt Argon.Salt = salt
Argon.DegreeOfParallelism = 36 Argon.DegreeOfParallelism = 48
Argon.Iterations = nIterations * 1.2 Argon.Iterations = nIterations * 1.375
Argon.MemorySize = (((nIterations * 4 - (nIterations * 1.2) / 1.95 * 2.28) / 0.08) + 1 * 256) / 2 Argon.MemorySize = (((nIterations * 1.375 - (nIterations * 1.2) / 1.95 * 2.28) / 0.08) + 1 * 256) / 2
Return Await Argon.GetBytesAsync(nHash) Return Await Argon.GetBytesAsync(nHash)
End If End If
@@ -58,8 +58,7 @@ Public Class VERAG_VARIABLES
Dim newHash As Byte() = Await HashPassword(passw, salt, nIterations, nHash) Dim newHash As Byte() = Await HashPassword(passw, salt, nIterations, nHash)
Return hash.SequenceEqual(newHash) Return hash.SequenceEqual(newHash)
End Function End Function
Public Shared Function RandomInteger(ByVal min As Integer, ByVal _ Public Shared Function RandomInteger(ByVal min As Integer, ByVal max As Integer) As Integer
max As Integer) As Integer
Dim rand As New RNGCryptoServiceProvider() Dim rand As New RNGCryptoServiceProvider()
Dim one_byte() As Byte = {0} Dim one_byte() As Byte = {0}
rand.GetBytes(one_byte) rand.GetBytes(one_byte)

View File

@@ -24,8 +24,9 @@
void Application_Error(object sender, EventArgs e) void Application_Error(object sender, EventArgs e)
{ {
// Code, der ausgeführt wird, wenn ein nicht behandelter Fehler auftritt // Code, der ausgeführt wird, wenn ein nicht behandelter Fehler auftritt
//Response.Redirect("../login/Error.aspx"); //Response.Redirect("../login/Error.aspx");
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("ja@verag.ag", VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString["Errcode"]), "Beim Besuch der Seite:" + Request.QueryString["Errcode"] + "ist es zum Fehler:" + VERAG_PROG_ALLGEMEIN.cCryptography.Decrypt(Request.QueryString["Errcode"]) + "gekommen." + System.Environment.NewLine + "Bitte Entschuldigen Sie die Unannehmlichkeiten.", "support@verag.ag", true, true, "", null);
} }
void Session_Start(object sender, EventArgs e) void Session_Start(object sender, EventArgs e)