08-27-2005, 02:35 AM
Ok, here's mine. You use the same sub for encrypting/decrypting, which means you can't double/triple/etc. encrypt.
Code:
Declare Function DEncrypt ( argText As String, argPassword As String ) As String
Dim password As String, text As String
text = "Hello, this is a test"
password = "Hello, this is a test"
Function DEncrypt ( argText As String, argPassword As String ) As String
Dim seed As Integer
Dim tempCount As Integer
Dim tempText As String
tempText = argText
For tempCount = 0 To Len( argPassword ) - 1
seed += argPassword[tempCount]
Next tempCount
Randomize seed
For tempCount = 0 To Len( argText ) - 1
tempText[tempCount] = ( argText[tempCount] Xor Int( Rnd * 256 ) )
Next tempCount
Return tempText
End Function