Click here to Skip to main content
15,889,488 members
Articles / Programming Languages / Visual Basic
Article

'Encryption/Decryption with .NET' Modified (Frank Fangs' Code) CCW and VB

Rate me:
Please Sign up or sign in to vote.
4.86/5 (4 votes)
19 May 2002 111.1K   1.2K   37   12
Modified version of Frank Fang's code ported to VB and made CCW.

Introduction

This is a modified version of "Encryption/Decryption with .NET" by Frank Fang. This version has been ported to VB and is also a CCW. A COM Callable Wrapper allows you to use the .NET class in VB 6.0.

I have included two tester applications, just forms that you can use to test the encryption/decryption. The key is hard coded, you can change it in the form variables.

Here is a link to the original author's submission: Encryption/Decryption with .NET.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalfine Pin
vengadanathan22-Jan-07 19:41
vengadanathan22-Jan-07 19:41 
Generalsocket programming Pin
Member 14138373-Oct-04 21:34
Member 14138373-Oct-04 21:34 
GeneralError: Bad Data Pin
LuckyWolf1911-Dec-02 9:57
LuckyWolf1911-Dec-02 9:57 
GeneralRe: Error: Bad Data Pin
Dan Elebash12-Dec-02 4:54
Dan Elebash12-Dec-02 4:54 
GeneralRe: Error: Bad Data Pin
TienDT29-Jan-04 23:48
TienDT29-Jan-04 23:48 
QuestionVB6? Pin
jimtxas20-Nov-02 3:43
jimtxas20-Nov-02 3:43 
AnswerRe: VB6? Pin
Dan Elebash20-Nov-02 6:00
Dan Elebash20-Nov-02 6:00 
QuestionHardcoded signature key? Pin
RBP1-Oct-02 5:52
RBP1-Oct-02 5:52 
AnswerRe: Hardcoded signature key? Pin
Dan Elebash1-Oct-02 5:58
Dan Elebash1-Oct-02 5:58 
QuestionHow to use the Cryptovb.dll in VB 6.0? Pin
bryanli26-May-02 17:17
bryanli26-May-02 17:17 
AnswerRe: How to use the Cryptovb.dll in VB 6.0? Pin
Dan Elebash27-May-02 5:58
Dan Elebash27-May-02 5:58 
Note: This is if you want to use CCW, just using it in VB.Net should be straight forward.

A good reference in VS.Net search for COM Interop Part 2: C# Server Tutorial

1) create key pair see help topic "Creating a Key Pair"
To create a key pair

At the command prompt, type the following command:
sn –k <file name="">

In this command, file name is the name of the output file containing the key pair.

The following example creates a key pair called sgKey.snk.

sn -k sgKey.snk

2) Open the Cryptovb.sln
Change the crypto.vb <assembly: assemblykeyfile("e:\sgkey.snk")=""> to point to the key file you created in step 1

3)View properties of Cryptovb project, choose configuration properties, then build, then check the box for Register for Com Interop, then build the solution.

This finishes the Server side

VB 6.0 Client Side
1) open CCWCryptovb.vbp
2) Add a reference to the Crypto.dll this should be registered now, that was what the Register for Com Interop check box did when you built the server side
3) Run the sample project.

Hope this is what you are looking for.
GeneralRe: How to use the Cryptovb.dll in VB 6.0? Pin
bryanli27-May-02 19:41
bryanli27-May-02 19:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.