PW zum Testen der Serverfunktion wird nun dynamisch generiert bei jedem Neustart der Session.

This commit is contained in:
ja
2022-01-03 10:05:47 +01:00
parent ba874e5a4c
commit a688e07cc4
3 changed files with 9 additions and 10 deletions

View File

@@ -44,9 +44,9 @@ Public Class VERAG_VARIABLES
Else
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 24 * (nHash / nHash * 1.03)
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 3)
Argon.MemorySize = (((nIterations * 8.485 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
Argon.DegreeOfParallelism = 28
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5)
Argon.MemorySize = (((nIterations * 6.685 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
Return Argon.GetBytes(nHash)
End If
@@ -65,12 +65,11 @@ Public Class VERAG_VARIABLES
Else
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt
Argon.DegreeOfParallelism = 24 * (nHash / nHash * 1.03)
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(1, 3)
Argon.MemorySize = (((nIterations * 8.485 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
Argon.DegreeOfParallelism = 28
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5)
Argon.MemorySize = (((nIterations * 6.685 - (nIterations * 0.56) / 1.85 * 2.28) / 8.28) + 1.024 * 416)
Return Await Argon.GetBytesAsync(nHash)
End If
End Function
Public Shared Function Verifyhash(ByVal passw As String, salt As Byte(), ByVal hash As Byte(), ByVal nIterations As Integer, ByVal nHash As Integer) As Boolean