Rixort

VB encryption

Download all the source code for this project as a single zip file (0.35KB).

modEncrypt.bas:

Option Explicit

Public Function Encrypt(ByVal Plaintext As String) As String

Dim i As Integer
Dim x As Double

x = 1

For i = 1 To Len(Plaintext)
    x = Sqr(x * i * Asc(Mid(Plaintext, i, 1)))
Next i

Rnd (-1)
Randomize x

For i = 1 To 32
    Encrypt = Encrypt & Hex(Rnd * 15)
Next i

End Function