VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Encrytpion and Decryption

Rhian Aseniero  (8 Submissions)   String Manipulation   VB 6.0   Unknown Difficulty   Tue 4th February 2003   Mon 8th February 2021

Encrytpion and Decryption

API Declarations


Dim ctr1, ctr2 As Integer
Dim acc1(10), acc2(10) As Integer
Dim enc_key, res(10), new_str As String

new_str = ""
For ctr2 = 1 To Len(pass)
acc2(ctr2) = Asc(Mid(pass, ctr2, 1))

Next ctr2

enc_key = "drugAddict"

For ctr1 = 1 To Len(enc_key)
acc1(ctr1) = Asc(Mid(enc_key, ctr1, 1))

Next ctr1

If flag = True Then
For ctr2 = 1 To 10
res(ctr2) = Chr(acc2(ctr2) + acc1(ctr2))
new_str = new_str & res(ctr2)
Next ctr2
Else
For ctr2 = 1 To 10
res(ctr2) = Chr(acc2(ctr2) - acc1(ctr2))
new_str = new_str & res(ctr2)
Next ctr2
End If
Encrypt_Password = new_str
End Function

Rate Encrytpion and Decryption (2(2 Vote))
Encrytpion and Decryption.bas

Encrytpion and Decryption Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters