加密和解密字符串 [英] Encrypting and Decrypting Strings

查看:99
本文介绍了加密和解密字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从这里复制一个脚本:


https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/strings/演练 - 加密和解密字符串



当我在我加密的访问数据库的vaule上使用解密时, 它停留在这一行:


cryptStream FlushFinalBlock ()


我收到错误:


System.Security.Cryptography.CryptographicException:'Bad Data


当我从我的表单解密一个简单的文本时,它的效果很好..

解决方案

你好,


请发布导致问题的所有代码,而不是单行代码。更多细节是最好的。


最好知道你正在使用哪种类型的字段。


并在使用代码块按钮时请发布代码。



i copy a script from here:

https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/strings/walkthrough-encrypting-and-decrypting-strings

when i use the decryption on a vaule from my access db that i encrypted,  it stuck on this line:

cryptStream.FlushFinalBlock()

and i get an error :

System.Security.Cryptography.CryptographicException: 'Bad Data

when i decrypt a simple text from my form it works great..

解决方案

Hello,

Rather than a single line of code, please post all code leading up to the problem. More details are best.

It would be good to know what type of field you are working with too.

And use the code block button when posting code please.


这篇关于加密和解密字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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