加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

winforms – 如何在Windows窗体应用程序中隐藏连接字符串

发布时间:2020-12-13 20:25:18 所属栏目:Windows 来源:网络整理
导读:你们知道exe文件中的硬编码编码很容易通过一些软件(例如代码反射器)看到,我想知道我是如何隐藏我的连接字符串,其中包含sql server用户名和密码的信息以连接到windows中的数据库通过任何代码反射器看到应用程序,以便除我之外的任何其他人可能永远无法在未经我
你们知道exe文件中的硬编码编码很容易通过一些软件(例如代码反射器)看到,我想知道我是如何隐藏我的连接字符串,其中包含sql server用户名和密码的信息以连接到windows中的数据库通过任何代码反射器看到应用程序,以便除我之外的任何其他人可能永远无法在未经我许可的情况下使用我的应用程序.
如评论所述,您最好使用集成安全性,但如果您使用混合模式身份验证定位SQL Server,则可以使用Data Protection API加密app.config中的连接字符串.这是一篇关于这个主题的精彩文章:

Protecting application secrets,such as database connection strings
and passwords,requires careful consideration of a number of pertinent
factors such as how sensitive the data is,who could gain access to
it,how to balance security,performance,and maintainability,and so
forth. This article explains the fundamentals of data protection and
compares a variety of techniques that can be used to protect
application settings. The author discusses what to avoid,such as
hiding keys in source code and the use of Local Security Authority. In
addition,he presents some effective solutions such as the Data
Protection API.

Safeguard Database Connection Strings and Other Sensitive Settings in Your Code

How To: Use DPAPI to Encrypt and Decrypt Data (C#/VB.NET)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读