Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

encryption in .NET 2.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eugenet@rusmex.com - 31 Aug 2006 16:18 GMT
Hello,

I need to encrypt and decrypt a string in .NET Framwork 2.0.

What is the easiest way to do it?

I know that there are many different ways to use encryption in .NET,
some more complex than others. All I need is to hide from an end-user
some clear-text settings -- nothing super secretive.

The reliability of the encryption routine and the easy of development
are the primary goals.

Thank you for your advice.

Evgueni
Richard Whitcher - 31 Aug 2006 16:32 GMT
Evgueni,

> I need to encrypt and decrypt a string in .NET Framwork 2.0.
>
> What is the easiest way to do it?

As you say it's nothing super secretive, so I'm assuming that you just
need to encrypt something so the average user doesn't mess about with it.

If that is the case, a simple base64 encoding and decoding method would
do the job.

Regards,

Richard
Signature

Google First. Ask Later

Cor Ligthert [MVP] - 31 Aug 2006 16:36 GMT
Eugenet,

I see that you have these goals.

> The reliability of the encryption routine and the easy of development
> are the primary goals.

What do you think other people want?

However here the starting links of the encrypting methods in Net

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemsecuritycryptographysymmetricalgorithmclasstopic.asp


:-)

Cor

> Hello,
>
[quoted text clipped - 12 lines]
>
> Evgueni
Mythran - 31 Aug 2006 16:44 GMT
> Hello,
>
[quoted text clipped - 12 lines]
>
> Evgueni

If you need to hash something, I'd use System.Security.Cryptography.MD5 or
another class from the Cryptography.  Heck, if I needed to do anything
cryptographically, I'd use the System.Security.Cryptography namespace :)

Mythran
eugenet@rusmex.com - 31 Aug 2006 17:47 GMT
Thank you for your posts. For my purposes, base64 encoding is the way
to go.

> > Hello,
> >
[quoted text clipped - 18 lines]
>
> Mythran
Peter Bromberg [C# MVP] - 31 Aug 2006 20:42 GMT
if you want to do something reallyreallysimple, use an XOR algorithm.

You only need one method, it will XOR each character against a known value
(from 0 to 255 for ASCII)  and spit out an xor-ed string that is the same
length as the original. To Decrypt it, send the xor-ed string back into the
same method. You can do all this in about 5 lines of code.
Peter

Signature

Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

> Hello,
>
[quoted text clipped - 12 lines]
>
> Evgueni

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.