如何使用AES 256密钥加密和解密C#.Net中的数据 [英] How to Encrypt and Decrypt the data in C#.Net with AES 256 Key

查看:514
本文介绍了如何使用AES 256密钥加密和解密C#.Net中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



如何使用AES 256 Key类型加密和解密C#.net中的数据,并且需要存储在数据库中。



我需要在Windows服务中使用c#.net。





谢谢提前

Guru

Hi All,

How to Encrypt and Decrypt the data in C#.net using the AES 256 Key type and need to store in database.

I need to use this in Windows Services with c#.net.


Thanks in advance
Guru

推荐答案

hi gurusha,

查看此链接,了解如何使用AES加密和解密:

http://msdn.microsoft.com/fr-fr/library/system.security.cryptography.aes(v = vs.110).aspx [ ^ ]





因为你打算使用数据库,我建议使用ORM,例如Entity FrameWork



希望它有所帮助。
hi gurusha,
check this link on how to crypt and decrypt using AES:
http://msdn.microsoft.com/fr-fr/library/system.security.cryptography.aes(v=vs.110).aspx[^]


since you are going to use a database, i recommend using an ORM such as Entity FrameWork

Hope it helps.


你可以找到包含这些alg的.dll orithms。您可以在nuget存储库中找到它们。在Google上输入nuget,然后输入类似AES的内容。
You can find .dlls that include these algorithms. You could probably find them in the nuget repository. Type nuget on Google and then something like AES.


使用 System.Security.Cryptography.AesCryptoServiceProvider 类。



这是指向MSDN网页的链接,并提供了一个使用示例:

AesCryptoServiceProvider类 [ ^ ]


这篇关于如何使用AES 256密钥加密和解密C#.Net中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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