473,503 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encrypt textfile using vb. Net

Does VB.Net provide function to encrypt/decrypt text file?
Nov 20 '05 #1
4 1781
On 2003-11-05, MrKrich <an*******@discussions.microsoft.com> wrote:
Does VB.Net provide function to encrypt/decrypt text file?


Check out the numerous encryption classes in
System.Security.Cryptography.

HTH
--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #2
There's no native function that I know of, but there are a tons of examples.
Like Tom mentioned, you will need to explory the Cryptography libraries.

Having swam through the rough waters of Crypto recently, let me mention a
few things...

Cryptography !=Cryptography . Why, well, there are many different
algorithms and they aren't all equal. Given enough computer power, any code
can get cracked. However, if you only need it hidden for two days, you'll
certianly need less power than if you need something hidden for a month or
year. Every boss will say "I want the strongest crypto available"...until
the realize that encrypting something that only needs hidden for a day on a
really large file might have some serious performance implications. Then
the next answer is "Well, our stuff isn't that important to hackers so just
get something that will keep the average joe out of it"... All of this
oversimplifies the context.

So, the first question you want to ask is "How strong do I need my
encryption to be?" You have a choice among providers and from there,
whether or not you want Symmetric or Asymmetric algorithms. Each has
benefits and downsides. Generating a Public and Private Key certainly gives
you more strength, but it's also more difficult to deal with...particularly
if you have a ton of users and you want to generate keysets dynamically....

Here's a link I found helpful..
http://www.devx.com/security/Article/7019/0/page/1 But I'd recommend
Googling on Cryptography VB.NET or C# and checking out what's out there...In
it's simplest form, it's very easy to implement..and in it's most complex,
it's quite a pain...so you may want to read up on it in depth and make a
decision from there.

HTH,

Bill
"MrKrich" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Does VB.Net provide function to encrypt/decrypt text file?

Nov 20 '05 #3
* "MrKrich" <an*******@discussions.microsoft.com> scripsit:
Does VB.Net provide function to encrypt/decrypt text file?


You will find some (German commented) code here:

<http://www.activevb.de/rubriken/vbdotnettipps/tipp0010.html>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
Nov 20 '05 #4
lok under the cryptography how to on gotdotnet

http://samples.gotdotnet.com/quickstart/howto/
"MrKrich" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Does VB.Net provide function to encrypt/decrypt text file?

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4990
by: Hans A | last post by:
I have a textfile "textfile.txt" containing a list of words. There is one word on each line. I want to pick two random lines from this textfile, and I have tried to do something like: //Loading...
1
2525
by: Larry Rekow | last post by:
I have a report that's created each day as a flat textfile. Because I came from the Access world, I created a macro that imports it with a schema that gives meaningful names to the various...
20
4130
by: Drebin | last post by:
It's a long story really, but the bottom line is we need to encrypt or obfuscate a clear-text 9-digit SSN/taxpayer ID into something less than 21 characters. It doesn't need to be super-secure,...
4
1527
by: Kevin Johnson | last post by:
Hi Using C# and a textfile I need to do two things: 1. Read the contents of the textfile and return the number of words contained in it. 2. Output a list of unqiue words (i.e. not...
8
1993
by: andreas | last post by:
A textfile can have different formats like ANSI,UTF8, Unicode ... Using streamreader for a textfile can have different results for chars like é,à,è....depending of the fileformat. To solve this...
2
3168
by: fineman | last post by:
Hi all, I want to get a 64bit(8 bytes) Encrypt result use DES class in the VS2005. Though I encrypt data is 64bit(8 bytes), but DES return encrypt result that always is 128bit(16 bytes), I don't...
3
8210
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
14
3282
by: blumen | last post by:
Hi all, I'm a newbie in VB.Net Programming.. Hope that some of you can help me to solve this.. I'm working out to read,parse and save textfile into SQL Server. The textfile contains thousands...
1
2803
by: asedt | last post by:
With my Excel macro and two text files I want to create a new textfile containing the first textfile then text from the sheet and then the second textfile. My problem is that i don't know how to...
0
7087
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7281
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6993
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.