VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Encrypts and decrypts text

by Shayne Cairns (5 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 17th April 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Encrypts and decrypts text

API Declarations


'add two command buttons named cmdEnc, cmdDec


Rate Encrypts and decrypts text




sinp = txtInput.Text
sout = ""
For p = 1 To Len(sinp) Step 1
sc = Mid(sinp, p, 1)
nc = Asc(sc) + 3
sout = sout + Chr(nc)
Next p

txtInput.text = sout

end sub

private sub cmdDec_click()

sinp = txtInput.text
sout = ""
For p = 1 To Len(sinp) Step 1
sc = Mid(sinp, p, 1)
nc = Asc(sc) - 3
sout = sout + Chr(nc)
Next p

txtInput.text = sout

ed sub


Download this snippet    Add to My Saved Code

Encrypts and decrypts text Comments

No comments have been posted about Encrypts and decrypts text. Why not be the first to post a comment about Encrypts and decrypts text.

Post your comment

Subject:
Message:
0/1000 characters