我可以使用加密来隐藏我的数据库密码吗? [英] Can I use encryption to hide my database password?

查看:92
本文介绍了我可以使用加密来隐藏我的数据库密码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!



我正在VB.Net上开发一个使用MySQL数据库的应用程序。目前,我正在寻找一种方法来避免在我的应用程序代码中存储我的数据库密码。我也不想将它以纯文本形式存储在注册表中。



现在我想知道VB.Net中的数据加密;如果我实现它,并且如果有人可以访问代码,那么该人是否也能够找出数据库密码?使用加密是否只是将纯文本存储在注册表中(如果可以看到代码)?



什么是安全隐藏/存储的最佳方式应用程序用于连接MySQL的主密码? (我希望我能说清楚)



谢谢!

Hi all!

I'm developing an application on VB.Net that uses a MySQL database. Currently, I'm looking for a way to avoid storing my database password in my application code. Neither do I want to store it in plain text in the registry.

Now I'm wondering about data encryption in VB.Net; If I implement it, and if anyone get access to the code, will that person also be able to figure out the database password? Is using encryption same as just storing the plain-text in the registry (if the code can be seen)?

What will be the best way to safely hide/store the main password that the application uses to connect to MySQL? (I hope I make myself clear)

Thank you!

推荐答案

1。将连接字符串存储在配置文件中而不是应用程序内部

2.加密配置文件: https://msdn.microsoft.com/en-us/library/dtkwfdky(v = vs.140).aspx [ ^ ]
1. Store the connection string in the configuration file and not inside the application
2. Encrypt the configuration file: https://msdn.microsoft.com/en-us/library/dtkwfdky(v=vs.140).aspx[^]


如果你的密码在代码的某个地方,无论是普通的还是加密的,都会有人找到它!

重点是密码值多少钱才能找到它!

如果您不希望他们发现某些内容并未将其置于您的脑海之外(目前......直至心灵感应披露;))。
If your password is somewhere in the code, in plain or encrypted or whatever, someone will find it!
The point is how much the password is worth the effort to find it!
If you don't want that they found something don't put it somewhere outside of your mind (for the moment... up to telepathic disclosures ;)).


这篇关于我可以使用加密来隐藏我的数据库密码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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