为什么此代码无法运行请帮帮我 [英] why this code can't run Help me please

查看:75
本文介绍了为什么此代码无法运行请帮帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dim encryptedPassword As New MemoryStream()

      Dim RC2 As New RC2CryptoServiceProvider()
      RC2.Key = Encoding.ASCII.GetBytes(TextBox1.Text)
      Dim iv() As Byte = {10, 20, 30, 40, 50, 60, 70, 80}




谁知道可以帮助我




who know help me please

推荐答案

可能是因为对称密钥的长度不正确.鉴于它可能不是对称密钥,所以毫不奇怪.

如果这是您加密密码的方法,以致无法读取密码,请不要.请改用哈希算法.这里有一个讨论此问题的提示:密码存储:操作方法. [^ ]
Probably because it''s not the right length for a symmetric key. Given it probably isn''t a symmetric key,m thjat shpoudl come as no surprise.

If this is your method encrypting passwords so they can''t be read, then don''t. Use a Hashing algorithm instead. There is a tip here that talks about this: Password Storage: How to do it.[^]


这篇关于为什么此代码无法运行请帮帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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