我编辑这篇文章是因为我是新来的,并且没有提供足够的信息,所以我正在用更多信息和我的代码来编辑这篇文章。
所以我需要对数据库上的密码进行加密/模糊处理,这样,如果有人获取了我的数据库,我知道它将是安全的。
这是我的C#代码
连接:
NoMethodError: undefined method 'new' for nil:NilClass
注册码:
MySqlConnection conn = new MySqlConnection("server =; database =; user id =; password =;");
MySqlDataAdapter adapter = new MySqlDataAdapter();
MySqlCommand command = new MySqlCommand();
public DataSet ds = new DataSet();
登录代码:
ds = new DataSet();
adapter = new MySqlDataAdapter("insert into element (username, password) VALUES ('" + textBox1.Text + "','" + textBox2.Text + "')", conn);
adapter.Fill(ds, "element");
MessageBox.Show("Registered!");
textBox1.Clear();
textBox2.Clear();
所以没有人知道我该如何以最安全的方式进行加密,因此,当我在mysql内注册“加密代码”时,在登录时解密它或执行某些操作时,所有帮助都将受到赞赏