Advertisement
| Hall of Fame |
|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: |
Public Function encrypt_adage_pw(ByRef inp_str As String) As String
Dim change_numer As Short
'Dim inp_str As String
Dim passwd As String
Dim status As Short
Dim seed As Short
Dim encrypt_key As New VB6.FixedLengthString(62)
Dim encrypt_len As Short
Dim i As Short
Dim inp_len As Short
Dim acc_tot As Short
Dim no_of_chars As Short
Dim ord_inp_char As Short
Dim op_char As String
Dim ord_op_char As Short
Dim decmal As Short
Dim hex_str As String
Dim change_number As Short
'inp_str = Text1.Text
change_number = 2
encrypt_key.Value = "bDf&3Rt]xQ5!M\sqO/>kGNArm9:iX@(0+S""$ec[ZpHJy}zgVwoLvTK2<=4dFnEWhY1|aPU8)7^lB-jC{6.;`#u*_%,?~I"
no_of_chars = Len(encrypt_key.Value)
encrypt_len = 8
If Len(inp_str) < 8 Then
inp_str = New String(" ", 8 - Len(inp_str))
End If
inp_len = Len(inp_str)
If inp_len = 0 Then
Exit Function
End If
i = 1
While i <= inp_len
decmal = 0
hex_str = (Right(Left(inp_str, i), 1))
decmal = Asc(hex_str)
seed = seed + decmal
i = i + 1
End While
hex_str = " "
decmal = 0
acc_tot = seed
passwd = ""
i = 1
While i <= encrypt_len
ord_inp_char = i Mod inp_len
If ord_inp_char = 0 Then
ord_inp_char = inp_len
End If
decmal = 0
hex_str = Right(Left(inp_str, ord_inp_char), 1)
decmal = Asc(hex_str)
acc_tot = acc_tot + decmal + i + ord_inp_char
ord_op_char = (acc_tot Mod no_of_chars) + 1
op_char = Right(Left(encrypt_key.Value, ord_op_char), 1)
passwd = Trim(passwd) & op_char
i = i + 1
End While
encrypt_adage_pw = passwd
|