解密字符串中的问题 [英] Problem during Decrypt String
本文介绍了解密字符串中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我解密字符串时,它会抛出这样的错误
Base-64的长度无效char数组或字符串。
我使用此代码进行解密
Dim decripttoken As String = OBJ.Decrypt(Request.QueryString(UserId)。ToString())
while I am decrypt string that time it will throw an error like this
Invalid length for a Base-64 char array or string.
and i am use this code for decrypt
Dim decripttoken As String = OBJ.Decrypt(Request.QueryString("UserId").ToString())
推荐答案
消息说明一切:Base64
消息必须长度为4
的倍数> 。因此传递的消息无效作为Decrypt
方法的参数。
The message says it all:Base64
messages must have lenght multiple of4
. Hence the passed message is not valid as parameter for theDecrypt
method.
这篇关于解密字符串中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文