I <3 Steve McConnell*
Coding Horror
programming and human factors
by Jeff Atwood

Apr 18, 2005

Encryption for Dummies

I just posted a new article on CodeProject, .NET Encryption Simplified. In my spare time over the last 6 months, I've delved deeper and deeper into the System.Security.Cryptography classes. And you know what I learned? Cryptography is hard.

Anyway, I now have a heavily documented wrapper class that I feel pretty good about. And a much deeper understanding of the key concepts behind symmetric encryption, asymmetric encryption, and the theory of hashing.

Feedback welcomed.

Posted by Jeff Atwood    View blog reactions
« VS.NET 2005 Beta 2 "goes live"
What Would Blanka Do? »
Comments

Hex is a two-way property, eg:

Dim d as New Encryption.Data
d.Hex = "DEADBEEF"

p.s. Nice use of Michael Bolton, lol

Jeff Atwood on June 12, 2005 7:02 AM

hi,

for example we encrypt as hex string.

Dim encryptedData3 As Encryption.Data
Dim asym As New Encryption.Asymmetric()
Dim secret As String = "Michael Bolton"
encryptedData3 = asym.Encrypt(New Encryption.Data(secret))
sEncHexTxt = encryptedData3.Hex

There is no problem.

How can we decrypt this hex (sEncHexTxt) string...?
I can not able to convert it to encryption.data type.

Thanks...

Ozan K. on June 12, 2005 8:33 AM

Thanks...

Really it eases my pain...

Ozan K on June 15, 2005 2:45 AM

Hi,

I Save encryption(String) With Key In DataBase.
How can we decrypt this string...?


Thanks.

saeed on September 27, 2006 1:30 PM

Well i have a new theory for encryption first i thought to use my theory for compression and decompression but not worked but strangely i found it perfect for encryption like mapping file and data

Ari on September 8, 2008 10:50 AM

Thanks Jeff,

The code for the encryption class is no longer avaialble on CodeProject.

Is there somewhere else that it can be found?

Regards .... MarkJ
bms@bms.com.au

Mark J on January 28, 2009 7:32 AM

I found the code at:

http://www.dotnetmonster.com/Uwe/DirItem.aspx/Articles/NET-Framework/Security/NET-Encryption-Simplified

Thanks for sharing

Regards Mark

Mark J on January 28, 2009 7:51 AM

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Content (c) 2009 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.