Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

encrypt/decrypt data

Status
Not open for further replies.

SkyHigh

Technical User
May 30, 2002
309
0
0
CA
Hi Folks
Does anyone have some code to encrypt and decrypt data in a particular field of a table.

Thanks
Brenda
 
There was a discussion only a couple of days ago referring to the VB5/6 forum thread702-878630. It should be adaptable for the use you describe.

Roy-Vidar
 
Function codare(x As String) As String
Dim y As String
Dim i As Integer
Dim n As Integer
If x = "" Then
codare = ""
Exit Function
End If
n = Len(x)
y = ""
For i = 1 To n
y = y & Chr(Asc(Mid(x, i, 1)) + 5)
Next i
codare = y
End Function
Function decodare(x As String) As String
Dim y As String
Dim i As Integer
Dim n As Integer
If x = "" Then
decodare = ""
Exit Function
End If
n = Len(x)
y = ""
For i = 1 To n
y = y & Chr(Asc(Mid(x, i, 1)) - 5)
Next i
decodare = y
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top