VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Encryption And Decryption

by Roy Tanveer (1 Submission)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 5th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Encryption And Decryption

Rate Encryption And Decryption



 Public Function Encrypt(ByVal plain As String)
    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
    Encrypt = plain
End Function
  
        ' For Decryption
   Public Function Decrypt(ByVal Encrypted As String)
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
    Decrypt = 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