- Home
·
- Encryption
·
- Fast Encryption Scheme (with comment), dynamically changes (if you encrypt the same string, it chan
Fast Encryption Scheme (with comment), dynamically changes (if you encrypt the same string, it chan
Fast Encryption Scheme (with comment), dynamically changes (if you encrypt the same string, it changes) Supports strings up to 4404 bytes,
Rate Fast Encryption Scheme (with comment), dynamically changes (if you encrypt the same string, it chan
(2(2 Vote))
Dim temp As String
Dim tempA As String
Dim Rand As String
100:
Randomize
Rand = Right(Rnd, 3)
rad = Left(Rand, 1)
If Left(Rand, 1) = "-" Then
GoTo 100 'Make sure we get a len of 3 w/o negitive
End If
For i = 1 To Len(inpt)
crntASC = Asc(Mid(inpt, i, 1))
tempA = ((crntASC) Xor (Rand + i + rad)) + (i + rad)
If Len(tempA) = 4 Then
temp = temp & tempA
ElseIf Len(tempA) = 3 Then
temp = temp & "0" & tempA
ElseIf Len(tempA) = 2 Then
temp = temp & "00" & tempA
ElseIf Len(tempA) = 1 Then
temp = temp & "000" & tempA
End If
Next i
temp = Rand & temp
Encrypt = temp
End Function
Function Decrypt(ByVal inpt As String) As String
Rand = Left(inpt, 3)
For i = 4 To (Len(inpt) - 3) Step 4
z = z + 1
tempA = Mid(inpt, i, 4)
tempA = ((tempA - (z + Left(Rand, 1))) Xor (Rand + z + Left(Rand, 1)))
temp = temp & Chr(tempA)
Next i
Decrypt = temp
End Function
Fast Encryption Scheme (with comment), dynamically changes (if you encrypt the same string, it chan Comments
No comments yet — be the first to post one!
Post a Comment