Answer the question
In order to leave comments, you need to log in
How to make a table based password generator in VBA?
There is such an article https://habrahabr.ru/post/92033/
there is a table so I need to take the login from cell A1 and the password from B1 and generate it in C1 according to this table.
Maybe someone has some work?
Answer the question
In order to leave comments, you need to log in
Name the second sheet table
and put the table there, starting from the cell(1, 1)
Public Function Encrypt(pass As String, login As String)
Dim PassLength As Integer
Dim r, c, z As Integer
Dim encrypt_str As String
Dim ps, ls As String
PassLength = 16
encrrypt_str = ""
For i = 0 To PassLength - 1
ps = Mid(pass, (i Mod Len(pass)) + 1, 1)
ls = Mid(login, (i Mod Len(login)) + 1, 1)
For j = 1 To 39
For k = 1 To 3
If (Worksheets("table").Cells(j, k) = ps) Then
r = j
c = k
Exit For
End If
Next k
Next j
For l = 4 To 39
If (Worksheets("table").Cells(r, l) = ls) Then
z = l
Exit For
End If
Next l
encrrypt_str = encrrypt_str & Worksheets("table").Cells(c, z)
Next i
Encrypt = encrrypt_str
End Function
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question