加密数据库字符串VB.NET [英] Encrypt database string VB.NET

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

问题描述

Hai,我正在使用VB.Net为学校开发一个软件....我的任务是我想创建一个受保护的数据库连接Sting。意味着没人能检查我的数据库字符串是什么。有没有任何工具或任何方法可以帮助完成这项任务..

我看到很多软件老版本正在运行我们学校,有非常复杂的DB String系统...我无法找到它存储的位置...所以请帮我创建一个受保护的字符串..



通常在app.config文件中存储字符串..在这里我粘贴我们旧软件的配置文件...



<?xml version =1.0encoding =utf-8?> ; 
< configuration>
< appSettings>
< add key =Schoolvalue =Data Source = .; Initial Catalog = NO NEED OF DATABASE NAME; User ID = sa; Password = abc/>
< / appSettings>
< / configuration>





所以请帮助我....



我尝试了什么:



我还在努力解决这个话题......这只是我的开始。 ..请帮助

解决方案

Google有很长的路要走:在app.config中加密连接字符串 - Google搜索 [ ^ ]



有大量的信息在上面。


加密你的连接字符串,然后在你的app.confing中使用它。

加密检查这个链接: [ ^ ]


如果你想要保护你的连接字符串,最好不要将它存储在.config文件中。

如果你在代码中保留连接字符串并使用像 Dotfuscator 这样的混淆器,它将得到更好的保护。

更好的是使用加密,请参阅:在Visual Basic中加密和解密字符串|英特尔®开发人员专区Microsoft Docs []

另请参阅: .NET加密简化 [ ^ ]

Hai, I am developing a software for school using VB.Net.... my task is that I want to create a protected Database Connection Sting. means nobody can check what is my database string. Is there any tool or any methods which can help to accomplish this task..
I saw many software ever older version which is running our school, has very complicated DB String system... I am unable to find where it is stored... so please help me to create a protected string..

usually in app.config file stores the string.. here I am pasting the config file of our old software...

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<appSettings>
		<add key="School" value="Data Source=.;Initial Catalog=NO NEED OF DATABASE NAME;User ID=sa;Password=abc"/>
	</appSettings>
</configuration>



so please help me....

What I have tried:

still I am struggling with this topic... it is just my beginning... please help

解决方案

A little Google goes a long way: encrypt connection string in app.config - Google Search[^]

There's tons of information out there on it.


Encrypt your connection string and then use it in your app.confing.
For encryption check this link:[^]


If you want to protect your connection string it would be better not to store it in the .config file.
If you keep the connection string in code and use an obfuscator like Dotfuscator, it will be protected better.
Even better is to use encryption, see: Encrypting and Decrypting Strings in Visual Basic | Microsoft Docs[.]
Also see: .NET Encryption Simplified[^]


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

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