Solved

Encryption

Posted on 1998-07-30
2
203 Views
Last Modified: 2010-05-03
Hi all,
     I was wondering if any of you experts out there have an encryption routine or algorithm I can use.  I am trying to
encrypt selected information from an access database to a text file to be compressed and sent over to a remote
computer and decrypted on the remote computer.  Thanks!
0
Comment
Question by:palim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Expert Comment

by:anthonyc
ID: 1467216
this is a duplicate question.  Please do not answer it.
0
 
LVL 18

Accepted Solution

by:
deighton earned 50 total points
ID: 1467217
Public Function Decrypt(strInput As String, strDefault As String) As String
    Dim i, intAscii, intChar1, intChar2 As Integer
    Dim strTemp As String
   
    If strInput = "" Then
        Decrypt = strDefault
        Exit Function
    End If
   
    strTemp = ""
    For i = 1 To Len(strInput) Step 2
        intAscii = (ConvChar(Mid$(strInput, i, 1)) * 16) + ConvChar(Mid$(strInput, i + 1, 1)) - 13
        If intAscii < 0 Then intAscii = intAscii + 255
        strTemp = strTemp + Chr(intAscii)
    Next i
   
    Decrypt = strTemp
End Function

Public Function ConvChar(strInput As String) As Integer
    Select Case strInput
        Case "A"
            ConvChar = 10
            Exit Function
        Case "B"
            ConvChar = 11
            Exit Function
        Case "C"
            ConvChar = 12
            Exit Function
        Case "D"
            ConvChar = 13
            Exit Function
        Case "E"
            ConvChar = 14
            Exit Function
        Case "F"
            ConvChar = 15
            Exit Function
        Case Else
            ConvChar = Int(strInput)
        Exit Function
    End Select
End Function


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question