Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 16th, 2004, 10:59 PM
Authorized User
 
Join Date: Apr 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sara_1981
Default how to encrypt and decrypt string

Hi there,
could anyone give me a sample code to encrypt data and decrypt it in vb.net(asp.net).
I know we should use system.security.cryptography but I don't know how I could use the methods and properties in this class. I am new in this field (encrypting, ...)
regards

Regards
Sara
__________________
Regards
Sara
 
Old October 18th, 2004, 07:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

It depends on the algorithm; it's not straightforward. Which do you want to use.
 
Old October 18th, 2004, 11:37 PM
Authorized User
 
Join Date: Apr 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sara_1981
Default

I want to encrypt a password, which need high security. could anyone please help me.

Regards
Sara
 
Old October 29th, 2004, 02:13 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Usually for passwords, I use hashing. Because hashing doesn't have a decryption method, I consider it pretty secure. So all passwords are stored in their hashed form. When I need to check the password, instead of decrypting the hashed password, I hash the plain text version and compare the two. You can use the forms authentication class to get at the hashing method...

System.Web.Security.FormsAuthentication.HashPasswo rdForStoringInConfigFile(password, algorithm)

The algorithm argument can be either "sha1" or "md5".





Similar Threads
Thread Thread Starter Forum Replies Last Post
encrypt and decrypt query string hanusoftware ASP.NET 2.0 Professional 1 July 16th, 2007 04:53 AM
encrypt and decrypt fuadlutfi85 Pro JSP 0 July 5th, 2007 09:00 PM
decrypt a string converted by a php md5 algorithm? kawak_zx7 General .NET 8 September 15th, 2006 06:51 AM
How to encrypt and decrypt a pwd in vb.net harshaghanta ASP.NET 1.0 and 1.1 Professional 4 July 27th, 2006 03:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.