?
Solved

encryption n decryption of data

Posted on 2003-03-20
8
Medium Priority
?
220 Views
Last Modified: 2007-12-19
Hi
I have a programme written in Visual Basic and back end it uses
MS Access. i want to encrypted the data.
when i insert the data it should be encrypted/encoded and when i retrieve it, it should be
decrypted/decoded.
Can some one suggest how to do it.

Thanks

0
Comment
Question by:Gawai
[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
8 Comments
 
LVL 2

Expert Comment

by:Jacamar
ID: 8174466
Just be creative.  Create a good system for you encryption.  I always have more fun when I make up a new encryption for my codess.
0
 
LVL 20

Author Comment

by:Gawai
ID: 8174510
will u give some code just as a sample or give me some idea
thanks
0
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 200 total points
ID: 8174573
a very simple approach is to use what is known as XOR encryption:

define a suitable KEY string, of a suitable length (say 50 characters)  and then character by character you ENCRYPT the original string like this:

    strKey = "[SomeSuitableKeyStringOfCharcaters]"
    For iChar = 1 To Len(OriginalString)
        strTemp = strTemp & Chr$(Asc(Mid$(OriginalString, iChar, 1)) Xor Asc(Mid$(strKey, iChar, 1)))
    Next


here strTemp is the ENCRYPTED string

Amazingly enough, you DECRYPT the string in EXCATLY the same way, XOR with the SAME Key String!!!


As I said, this is VERY simple, and is designed to work with strings.  If you need to encrypt NUMBERS, then taht is another issue.

AW
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:Jacamar
ID: 8174602
http://www.visualbasicforum.com/t31778.html

Check out this site.  It has some good basic examples.
0
 
LVL 14

Expert Comment

by:CyrexCore2k
ID: 8175182
Zarr made a nice RC4 encryption module.
http://www.zarr.net/vb/download/codedetail.asp?code=46


To use it add the RC4.bas file to your project. Then make a global variable and call it EKEY give EKEY some random value of any length by just kinda pounding on the keyboard ;)

To encrypt data:

MyEncryptedData = RC4("Hello to the world!", EKEY)

To decrypt it:

MyDecryptedData = RC4(MyEncryptedData, EKEY)

Hope this helps
Spencer Ruport

0
 

Expert Comment

by:CleanupPing
ID: 8531931
Hi gawai,
This old question (QID 20557509) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8957359
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->Accept Arthur_Wood's comments as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

741 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