VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Logical String Encryption

by Adam Orenstein (6 Submissions)
Category: Encryption
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

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.

Rate Logical String Encryption

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

Download this snippet    Add to My Saved Code

Logical String Encryption Comments

No comments have been posted about Logical String Encryption. Why not be the first to post a comment about Logical String Encryption.

Post your comment

Subject:
Message:
0/1000 characters