Jump to content

Encrypts & Decrypts text file and stores the plain text in a text


Recommended Posts

I want to do it with VB.NET to DES or AES or RSA.

like this:

Encrypts the content of a text file and stores the cipher in another text file.

Decrypts a cipher stored in a text file and stores the plain text in a text file.

Your program should read from the user the path of the cipher and the plain text along with the key and either he/she wishes to encrypt or decrypt.

You may use one of the following languages to develop your program: C++, JAVA or VB.NET.

If you got the help of any packages or ready code, pleas mention it and provide all the resource you've used.

You can chose on or more of these algorithms to encrypt or decrypt.

o DES.

o AES.

o RSA.

Edited by RYU81
Link to comment
Share on other sites


I want to do it with VB.NET to DES or AES or RSA

Just check out the official documentation on MSDN, particularly for the System.Security.Cryptography namespace. It implements everything you're asking for crypto-wise.

For example, here's a sample that uses the DESCryptoServiceProvider. There also are AesCryptoServiceProvider and RSACryptoServiceProvider classes (another example here) which you can use similarly.

There's also countless articles on dozens of community sites like here, and google should find more relevant hits than you're ever going to be able to read if you use the right keywords.

Honestly, this stuff is trivial. It's the key management part that's a pain. You don't normally want to leave those around in text files (even text files you're going to delete as they're often easily recovered). Preferably, you use a hash of a salted password as encryption key or something along those lines. Your system is only secure as its weakest link, and if we can easily get the keys, then your encryption is pointless, no matter if it uses a fancy algo with 2048 bit key.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...