VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Encryption and decryption

by PulseWave (25 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Wed 24th February 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Encryption and decryption

Rate Encryption and decryption



Public Function Encrypt(ByVal Plain As String, Text As TextBox)
'DUH!'
    Dim Letter As String
    For i = 1 To Len(Plain)
        Letter = Mid$(Plain, i, 1)
        Mid$(Plain, i, 1) = Chr(Asc(Letter) + 1)
    Next i
Text = Plain
End Function

Public Function Decrypt(ByVal Encrypted As String, Text As TextBox)
'DUH!'
Dim Letter As String
    For i = 1 To Len(Encrypted)
        Letter = Mid$(Encrypted, i, 1)
        Mid$(Encrypted, i, 1) = Chr(Asc(Letter) - 1)
    Next i
    Text = Encrypted
End Function


Download this snippet    Add to My Saved Code

Encryption and decryption Comments

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

Post your comment

Subject:
Message:
0/1000 characters