Änderungen zu schnelleren werten dass Server entlastet wird und Performance nicht leidet.
This commit is contained in:
@@ -526,16 +526,17 @@ Partial Class login_Change_PW
|
||||
If isnewSession = False Then
|
||||
Dim token As String
|
||||
If String.IsNullOrEmpty(username) = False AndAlso String.IsNullOrEmpty(email) = False Then
|
||||
Dim intzahl = RandomInteger(Math.Pow(2, 8), Math.Pow(2, 16))
|
||||
Dim Rand As Random = New Random
|
||||
If String.IsNullOrEmpty(password) = False Then
|
||||
Try
|
||||
Dim intzahl = RandomInteger(Math.Pow(2, 8), Math.Pow(2, 11))
|
||||
Dim salt As String = VERAG_VARIABLES.GenerateSalt(intzahl)
|
||||
Dim tok As String = password
|
||||
token = VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(VERAG_VARIABLES.HashPassword(tok, salt, 1991, intzahl))
|
||||
token = VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(VERAG_VARIABLES.HashPassword(tok, salt, 1491, intzahl))
|
||||
salt = String.Empty
|
||||
tok = String.Empty
|
||||
Return token
|
||||
Catch Ex As Exception
|
||||
Dim intzahl2 = RandomInteger(Math.Pow(2, 7), Math.Pow(2, 13))
|
||||
Dim intzahl2 = RandomInteger(Math.Pow(2, 7), Math.Pow(2, 12))
|
||||
'Dim Msg, Style, Title As String
|
||||
'Msg = "Token Generation failed" & vbCrLf & "A new E-mail has been sent to the intern e-mail given."
|
||||
'Style = vbRetry + vbExclamation + vbDefaultButton1
|
||||
@@ -545,9 +546,10 @@ Partial Class login_Change_PW
|
||||
'genToken(username, password, email)
|
||||
Dim salt As String = VERAG_VARIABLES.GenerateSalt(intzahl2)
|
||||
Dim tok As String = password
|
||||
token = VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(VERAG_VARIABLES.HashPassword(tok, salt, 1991, intzahl2))
|
||||
token = VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(VERAG_VARIABLES.HashPassword(tok, salt, 901, intzahl2))
|
||||
salt = String.Empty
|
||||
tok = String.Empty
|
||||
Return token
|
||||
|
||||
End Try
|
||||
Else
|
||||
Return String.Empty
|
||||
|
||||
Reference in New Issue
Block a user