小编Ric*_*ual的帖子

MySQL 中加密,C# 中解密

我在 MySQL 中加密了数据,将其存储为 BLOB,然后需要在 C# 中对其进行解密,但没有得到预期的结果。

MYSQL 中的 BLOB:

MySQL 中的 BLOB

这是我的结果:

结果

应该只是PD001KY6900430

这是我的 C# 代码

string ConnectionString = "Data Source=win-3doecchgfbt;Initial Catalog=DWH;User id=sa;Password=Password123;";
        using (SqlConnection connection = new SqlConnection(ConnectionString))
        {
            string query = "SELECT * FROM tb_investor";
            SqlDataAdapter adapter = new SqlDataAdapter();
            var command = new SqlCommand(query, connection);
            adapter.SelectCommand = command;

            DataTable dTable = new DataTable();

            adapter.Fill(dTable);
            for(var x =0; x < dTable.Rows.Count; x++)
            {
                var dr = dTable.Rows;

                byte[] accNoByte = (byte[])dr[x].ItemArray[1];

                byte[] key = mkey("satu");

                var rkey = BitConverter.ToString(key).Replace("-", ""); …
Run Code Online (Sandbox Code Playgroud)

php c# mysql encryption blob

4
推荐指数
1
解决办法
838
查看次数

没有Internet连接的Visual Studio Xamarin和Android模拟器

我正在使用Visual Studio 2015开发Xamarin项目。

问题是我无法使用Internet从Visual Studio启动Android模拟器。我在代理后面。

使用HttpWebRequest,我得到了错误:

System.Net.WebException:错误:ConnectFailure(网络不可达)

我签出模拟器,未检测到Internet连接:

在此处输入图片说明

我能够使用命令行(使用emulator.exe -avd avdName -dns-server 192.168.1.1)启动模拟器来设置代理/ dns ,但不能从Visual Studio中启动。

我的问题是:有没有办法从Visual Studio或任何配置文件(如.ini或Avd文件夹中的config.ini)中将Proxy / dns配置设置为Android Emulator?

android visual-studio xamarin

2
推荐指数
1
解决办法
1396
查看次数

标签 统计

android ×1

blob ×1

c# ×1

encryption ×1

mysql ×1

php ×1

visual-studio ×1

xamarin ×1