Add Powerful Encryption To Your Visual Basic Programs -
I thought I would show you an easy way to add powerful encryption to your visual basic programs. Up till now, you either had to write the chipers in a fast language like C or deal with the CryptoAPI. Either way you went, it was very complex with uneven documentation. But lucky for the visual basic programmer, Microsoft released the CAPICOM component, which is a wrapper around the CryptoAPI. This is just a few examples of how to use it.
Installing CAPICOM:
The first thing you have to do is download CAPICOM. The CAPICOM component is available at:
http://www.microsoft.com/downloads/r...eleaseID=44155
Once you have that downloaded, extract the CAPICOM.DLL file into your system directory (system32 on xp). Then open up your command prompt (dos on some machines) and change directories to c:\windows\system32 (c:\windows\system\ on some platforms). Then type this into the command prompt and hit enter:
regsvr32.exe CAPICOM.DLL
You should see a message box telling you the install was successful.
Using CAPICOM:
Before we can use CAPICOM from our visual basic program, we must first add a reference to it. You can do so by going to “Project” in your menu and then “References”. Tick the CAPICOM type library and hit ok. Now you can call the CAPICOM functions from within visual basic.
Add the following to your form:
Make this text box big:
Text Box – Name=txtMessage, text=nothing, Multiline=true
Text Box – Name=txtPassword, text=nothing, passwordchar=*
Command Button – Name=cmdDecrypt, text = Decrypt
Command Button – Name = cmdEncrypt, text = Encrypt
Then paste the following code into your forum.
Code:
Private Sub cmdDecrypt_Click()
'Make sure we have entered all the information:
If txtMessage.Text <> "" And txtPassword <> "" Then
'This is our encryption object
Dim DecryptData As New EncryptedData
'We send the object the password to use to unlock the encryption:
DecryptData.SetSecret (txtPassword.Text)
'Send the ciphertext to the object and tell it to decrypt it.
DecryptData.Decrypt (txtMessage.Text)
'Get our plaintext from the object
txtMessage.Text = DecryptData.Content
End If
End Sub
Private Sub cmdEncrypt_Click()
'Make sure we have entered all the information:
If txtMessage.Text <> "" And txtPassword <> "" Then
'This is our encryption object
Dim encryptdata As New EncryptedData
'Before we can start encrypting, we got to define the
'algorithm, keysize, and the password (Used to generate key)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Algorithm to use: AES (Advanced Encryption Standard)
encryptdata.Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_AES
'You could also use:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'encryptdata.Algorithm =CAPICOM_ENCRYPTION_ALGORITHM_3DES
'encryptdata.Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_DES
'encryptdata.algorithm = CAPICOM_ENCRYPTION_ALGORITHM_RC2
'encryptdata.Algorithm = CAPICOM_ENCRYPTION_ALGORITHM_RC4
'Next we set our key size, which is a no brainer to put to max.
encryptdata.Algorithm.KeyLength = CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM
'Next we set our secret password to unlock the message.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
encryptdata.SetSecret (txtPassword.Text)
'We send the object the plaintext scramble:
encryptdata.Content = txtMessage.Text
'Return message as base64
txtMessage.Text = encryptdata.Encrypt(CAPICOM_ENCODE_BASE64)
End If
End Sub
I've also added the project (For those of u with vb 6)
Most powerful/popular VB program -
I was just wondering, what is one of the most powerful/popular programs there are, that was created using Visual Basic? (any version)
I just want to see how far its limits reach, you know? Because I know that Visual Basic isn't used for some of the more powerful programs and games
How practical is Visual Basic -
Sorry if this question sounds stupid, but i am brand new to windows programming, and am still trying to get the hang of everything. What I am wondering, is exactly how powerful and common are visual basic programs in windows. For example, are very large and complex programs, such as
Visual C++ VS. Visual Basic!! -
I'm new to Programming, C++ and Visual Basic.
This is my first year in college as a Computer Scientist and am looking forward to becoming a GOOD Programmer in many different Computer Languages.
Till now, we only make DOS based programs in C++, with no Interface or "Windows Look&
POWERFUL encryption -
oh my god! powerful encryption! WHat a concept!
Well, thats exactly what i need. And i need it to be compatible with VB. I wouldn't mind it in code, an ActiveX control, whatever, as long as it works.
Anyone know?
Learning VB .NET -
Hi! I currently program in VB 6.0. I am familiar with C & C++ just from classes I had to take in school. From what I understand, VB .NET is similiar in structure to C++ progamming. I would like to learn VB .NET but don't know that much about it. I am assuming VB .NET would all
is VB really powerful for database -
Hi..
I'm going to make a database application which will contain a huge database, and I'm wondering what program to use, is it VB or Visual Foxpro.
Is VB powerful enough to handle large databases? What's the benefits between the two programs? Because I know that Visual Foxpro is spec
Add Powerful Encryption To Your Visual Basic Programs -
I thought I would show you an easy way to add powerful encryption to your visual basic programs. Up till now, you either had to write the chipers in a fast language like C or deal with the CryptoAPI. Either way you went, it was very complex with uneven documentation. But lucky for the
Q Basic Is Back! -
Welcome back to qbasic, an extreamly powrful language for powerful programs! Yarinteractive.com is making a program called qbs (QBasic Studio). It will use a windows enviroment to make console applications. In Qbs Pro you will be able to use QBs to make windows programs, Without Runtim
Visual C++ DLLs for Visual Basic -
This may be asking a lot, but please try to help!
I'm trying to create a very simple encryption DLL for use in a Visual Basic program.
The encryptor works by having one function to set the random number seed using 'srand'. The other function will encrypt an array of bytes by xor-
Upgrading from Academic Licence -
Hi Everyone,
I was just after some opinions on the following:
I have been developing applications for personal use. Recently I have been working on an encryption program (still in progress), I think it may be good enough to distribute but I have an acedmic priced version of Visu
Come give your opinion! -
Well my dad owns Microsoft Visual Studio 6 Enterprise. At the moment I use that. It contains Microsoft Visual Basic 6, Visual C++ 6, and 2 more other things... My dad uses both the Visual Basic and the C++. I dont know C++ only VB. Im thinking of buying the Visual Basic 6 Standard Edit
Encryption and Compression -
I need an encryption routine with the emphasis being on speed, and the same for compression. I'd like them to be Visual Basic source if that's possible.
Eisecure asymmetric encryption -
From what a can see from a brief excusion into capicom dll, is that the following symmetric encryption algorithms can be implemented:
RSA RC2 encryption, RSA RC4 encryption, DES encryption, or triple DES encryption.
The example in MSDN only uses symmetric encryption, but I was i
Opening external programs -
How can I open external programs from a toolbar using Visual Basic 6?
External programs are like WinAMP, Microsoft Internet Explorer, Microsoft Word...etc. Pretty much anything that isn't Visual Basic 6 itself.
Please hurry...I need this quickly!!!
[2005] Strong encryption for sensitive information -
I have a program that is going to be taking credit card information, and I need to come up with some form of strong encryption for it. I have UNI-BASIC code for DES3 encryption, but my UNI-BASIC contact is unavailable at the moment.. I know .NET has a Cryptography class. Would I be abl
Open Programs In Visual Basic -
Is there a way to open up programs from VB. I wish to Open up Nero Showtime in Visual Basic. How could I do this. Also, Is there a way to restore programs already in the windwos task bar.
Thanks
VB - 128, 160 and 256 Bit File Encryption/Decryption with MD5, SHA1 and SHA256 -
For those of you who think that hashing is used for one way encryption only, you need to learn how to think "outside of the box"
This project is using the well known MD5, SHA1 and SHA256 to encrypt and decrypt files. I came up with the algorithm myself sometime last year,
Visual Basic Runtime Dll's -
Hi all there,
You know a visual basic programs is small in size, but it doesn't work in computers that does not have Visual Basic installed because they don't have the Visual Basic Runtime Files and libraries.
Is there any solution for this problem?
Isn't there any kind of compiling
Encryption and Decryption methods -
hi all
can any one tell what are the various encryption methoda avbailable in visual basic ,
i wanted to use two functions.
one function to decrypt the ecrypted string.
and another to storeea normal string in an encrypoted form,
what r the best mehtoda available ????
,,,
senth
Which package to install to run VB.NET programs -
Which package needs to be installed to run Visual Basic .NET programs? Could someone point me to the minimal requirements needed to run Visual Basic .NET applications?
Strong Encryption algorithm -
I was watching a show on TLC the other day about encryption and cryptography. It discussed the problems of distributing keys for un-encryption. It also showed an encryption algorithm developed that is (if I remember correctly) similar to the RSA method. The formula is:
m13 (mod k) =
[Solved]Visual Basic & Visual Basic.net -
Wat is the difference between Visual Basic & Visual Basic.net?
I just dont understand.....are they 2 different programming languages? Are they related to each other?
Do they both need the Ms Visual Basic software to develop?.....
Which is more powerful & which is bette
Opening com programs in Visual Basic 2005 -
Hi
I haven't used Visual Basic for 6 years and have forgotten what I had learn't.
How do I open a .com file in visual basic?
How do I close the program after the program has executed? normally it says press any key to exit.
Thanking you in advance.
Visual Basic.net help/reference (or lack thereof...) -
After having programmed in Visual Basic 5 (Visual Basic 3.0 and Quick Basic before that) for several years, I decided to give Visual Basic.net a look. One of the first things that I noticed is that just like Visual Basic 6 it doesn't come with its own help files making me have to rely
Encryption/Decryption -
Can someone explain to me what encryption is (for passwords and stuff) and do i need to encrypt my VB programs?
Lots of Questions about HTML, JAVA, FLash -
OK, I need lots of help here please. I know Visual Basic but I am completely dumb about all the other stuff. Im trying to figure out where to go from here. My first question is:
I hear a lot of people saying HTML is not a language, it's a markup. What the heck is that? Is it like a
Visual Basic used for large scale progs -
Is Visual Basic used to produce any commercial, big, fancy programs? Every single program I've downloaded off the internet, seems to be bare minimum EXE, I've never seen the extra files it's programs usually need to run...
Or in the "commercial world" do things like C/C++
Need Encrpytion Code -
Does someone have any Encryption code that I can use? I'm not to fussed on what level of encryption, I just want some basic encryption going.
Thanks in advance.
Visual Fox Pro vs Access -
How does visual foxpro compare to access? does anyone know how they are different. Is one more powerful / faster than the other? Why do microsoft have 2 database programs? i fugure there must be some differences between them..
Also, i've heard that Visual Foxpro is on the way out...
visual basic help desperately needed -
Visual Basic help desperately needed
I am brand new at visual basic,I am taking a class and trying to learn how to write programs, so far I'm completely confused. Is there anyone available willing to help me figure out how to write these programs for this class so I can get through
Development help -
Hi I'm a new self tought programmer reasently some one downloaded one of my programs and the help file would not work they use W95B on a P166 all my programs were designed with the Visual Basic Deluxe Learning Edition and are just simple data base programs I've installed and tested al
How powerful is VB withOUT Java, etc!! -
I'm fairly new with VB programming and am learning more and more each day. Boy is it powerful. BUT...for things like adding components and ole's, this is what troubles me:
If you have a dB back end, on Access, how can you ASSUME the user you distribute it to has MS Access?!! Is this a
Why Visual Basic 6 -
Visual Basic .NET has come to earth for years already. But I found out until today still many of us still sticking with Visual Basic 6. This can be proved from this site and many other Visual Basic website, where Visual Basic 6 is more active than the .NET.
I never use the .NET bef
Launch exe -
Hey, was just bored and was wondering if my microsoft visual basic program can launch exe. programs on my laptop using some sort of launcher made on the visual basic program? Idk, was thinking i can use it as practice incase i make a game later or something. Really new to visual basi
--==Help!==-- -
Hi!
I have Visual Basic at my university and I've taken extensive classes on VB Script as well as C++. Can anyone please direct me to somewhere I can get Visual Basic 6 other than P2P programs?
Visual Basic RAM question. -
Hey guys, .NET users, do compiled programs in VB .net take up as much ram as they do in Visual Basic 6? I may be wrong but it seems like they take up a bit of ram... thanks!
Windows 2000 and Visual Basic 6.0 . . . Is there going to be change in programming -
Hello i was wondering when windows 2000 comes out is there going to be an effect on how programs are made with Visual basics or VC++ Like can visual basic make window 2000 applications or Do i have to learn everything all over again so that you can make programs with that work with
Which screen resolution should I write for -
Hi,
I just bought Visual Studio 2005 and I am going to start from scratch to update our consumer software programs from Visual Basic 6.0 to Visual Basic 2005. If you were going to start from scratch what would be the minimum screen resolution you would write for? In our previous pr
"one way" encryption -
can any please suggest of "one-way" encryption in Visual basic 6. thanks!!!
A slight little rant.... -
I seen the new issue of Visual Studio Mag looking for some juicy code snippets, tips and tricks. And Too my horror most of the information was .NET framework related! Why all the fuss about the .NET framework already? I understand its new and suppost to be more powerful, but this is st