Tools Links Login

Logical String Encryption

This will logically encrypt a string by deviating its ASC() value. Works perfectly. Its just a VERY Short Algoritm the String gets passed through Charachter by Character. To decrypt just redo the encryption. just like a double negative.

Original Author: Adam Orenstein

Code

Public Function EncodeText(TheText As String) As String
Dim Letter As String
Dim TextLen As Integer
Dim Crypt As Double
  
  TextLen = Len(TheText)
  
  
  For Crypt = 1 To TextLen
    Letter = Asc(Mid(TheText, Crypt, 1))
    Letter = Letter Xor 255
    Result$ = Result$ & Chr(Letter)
  Next Crypt
  
  EncodeText = Result$
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 71 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.