Encrypt or Decrypt String
Encrypt or Decrypt String
API Declarations
'Pass the string to this function it returns the encrypted string in ascii codes
Rate Encrypt or Decrypt String
(1(1 Vote))
'Encryption function
Function StrEncode(ByVal s As String) As String
Dim a
b = ""
i = 1
a = s
Do While i < Len(a) + 1
b = b & (Asc(Mid(a, i, Len(a))) * 8)
i = i + 1
Loop
StrEncode = b
End Function
'Pass the encrypted string to this function it returns the decrypted string
'Decryption function
Function StrDecode(ByVal s As String) As String
Dim c As String
Dim p As Integer
j = 1
c = ""
b = s
Do While j < Len(b) + 1
p = Val(Mid(b, j, 3)) / 8
c = c & Chr(p)
j = j + 3
Loop
StrDecode = c
End Function
Encrypt or Decrypt String Comments
No comments yet — be the first to post one!
Post a Comment