在C#中加密字符串 [英] Encrypting String in C#

查看:125
本文介绍了在C#中加密字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想在ASP.Net MVC应用程序中创建一个登录表单。



当用户注册时,密码应加密,然后应存储在数据库中。





现在,我的观点任何人都可以使用C#语言为我提供加密和解密字符串的正确链接..



我不知道有多少类型的算法以及如何使用它们,但我想使用最简单的一个,因为它是我的开始步骤.....



我希望你理解我的问题,并提前感谢

Hi all,

I would like to create a login form in ASP.Net MVC application.

When the user registered, the Password should be encrypted and then it should be stored in DB.


Now, my point is any one can provide me the proper links for encrypting and decrypting the string using C# language..

I do not know how many types of algorithms are there and how to use them but i want to use the simplest one as it is the starting step for me.....

I hope you understand my question and thanks in advance

推荐答案

参考:

chandradev819.wordpress.com/2011/04/11/how-to-encrypt-and-decrypt-password-in-asp -net-using-c /



你也可以使用sql server加密:

blog.sqlauthority.com/2009/04 / 28 / sql-server-introduction-to-sql-server-encryption-and-symmetric-key-encryption-tutorial-with-script /


为什么你需要解密密码。出于安全原因,永远不应对其进行解密。加密尝试这些:



如何在c#中创建密码加密解密 [ ^ ]



使用asp.net加密或解密c#中的密码 [ ^ ]



希望有帮助:)
Why you need to decrypt the password. It should never be decrypted for security reasons. And for encryption try these:

how to create password encrypt decrypt in c#[^]

encrypt or decrypt password in c# with asp.net[^]

hope it helps :)


大家好,



我现在理解的是,



如果我们想要提供密码的安全性,那么我们可以通过两种方式来实现...



1.使用Hashing概念



2.使用加密和解密概念..



说明:



如果我们想使用Hashing,我们将使用Salt Value。 br />


Ex链接:



示例1 [ ^ ]



示例2 [ ^ ]







如果我们想要使用加密和解密概念,然后我们应该使用任何算法,如MD5,DES。 SHA等..



Ex链接:



使用C#中的DES加密/解密字符串 [ ^ ]



这是对的吗?它不仅仅指导我一次......哪一个更可取(即Hashing Concept或E& D Concept ....
Hi all,

What i understand till now is,

if we want to provide the security to passwords, then we can do it in two ways...

1. Using Hashing Concept

2. Usning Encrypting and Decrypting concepts..

Explanation:

If we want to use the Hashing then, we will use the Salt Value.

Ex Links:

Example 1[^]

Example 2[^]



If we want to use the Encryption and Decryption concept, then we should use any of the algorithms like MD5, DES . SHA etc..

Ex Links:

Encrypt/Decrypt String using DES in C#[^]

Is it correct ?. It not just guide me once....and which one is preferable(i.e either Hashing Concept or E&D Concept....


这篇关于在C#中加密字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆