如何在C#ASP.NET中使用散列列作为参数 [英] How to use a hashed column as a parameter in C# ASP.NET

查看:103
本文介绍了如何在C#ASP.NET中使用散列列作为参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我致力于创建一个Web应用程序来为用户分配数据库。我们获得授予用户访问权限的票证,服务台人员选择sql实例,在应用程序上输入用户名和密码以分配访问权限。我的问题是连接字符串都存储在sql数据库中,实例密码使用hashbyte函数加密。



我尝试过:



我如何通过我的C#asp.net代码连接到数据库,因为密码是加密的。技术支持人员只会选择实例而不是输入登录凭证

I working on creating a web application to assign user access to a database. We get a ticket to grant access to a user and the help desk person select the sql instance, enters the username and the password on the app to assign access. My issue is the connection strings are all stored in a sql database and the instance password is encrypted using hashbyte function.

What I have tried:

How am i going to connect to the database through my C# asp.net code since the password is encrypted.The help desk person will only select the instance and not enter the login crendentials

推荐答案

目前还不完全清楚你的代码是做什么的,或者你遇到了什么问题。



如果连接到其他数据库的连接字符串存储在数据库中,则必须有一个连接字符串,该字符串不存储在该数据库中以连接到该数据库,检索其他连接字符串。



如果实例密码经过哈希处理,则无法检索密码,因此您可以将其放入连接字符串以连接到该数据库。哈希是单向函数。您无法反转哈希以获取用于生成它的原始内容。
It's not entirely clear what you're code is going to be doing or what you're having a problem with.

If the connection strings to connect to other databases are stored in a database, you're going to have to have a connection string that IS NOT stored in that database to connect to that database and retrieve the other connection strings.

If an instance password is hashed, there's no way to retrieve the password so you can put it into a connection string to connect to that database. Hashes are one-way functions. You cannot reverse a hash to get the original content that was used to generate it.


这篇关于如何在C#ASP.NET中使用散列列作为参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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