|
string vCodeKeyJsonStr = AesHelper.DecryptEcbMode(rightVCodeKey, _options.AesKey); |
|
// json -> 对象 |
|
VCodeKeyModel vCodeKeyModel = null; |
|
try |
|
{ |
|
// TODO: fixed: 临时修复, 直接将全部为0的字节去除, |
|
byte[] bytes = Encoding.UTF8.GetBytes(vCodeKeyJsonStr); |
|
byte[] remove0Bytes = bytes.Where(m => m != 0).ToArray(); |
|
string remove0ByteStr = Encoding.UTF8.GetString(remove0Bytes); |
|
|
|
// 能够转换为 对象, 则说明 vCodeKey 无误, 可以使用 |
|
//vCodeKeyModel = JsonHelper.Deserialize<VCodeKeyModel>(vCodeKeyJsonStr); |
|
vCodeKeyModel = JsonHelper.Deserialize<VCodeKeyModel>(remove0ByteStr); |
|
} |
|
catch (Exception ex) |
|
{ |
|
// TODO: BUG: 经加密再解密后的jsonStr,虽然看起来一样,但发生了一点改变, 导致无法转换 |
|
// '0x00' is invalid after a single JSON value. Expected end of data. LineNumber: 0 | BytePositionInLine: 110. |
|
} |
经加密再解密后的jsonStr,虽然看起来一样,但发生了一点改变, 导致无法转换
// '0x00' is invalid after a single JSON value. Expected end of data. LineNumber: 0 | BytePositionInLine: 110.
SimCaptcha/src/SimCaptcha/SimCaptchaService.cs
Lines 63 to 81 in 32aac38
经加密再解密后的jsonStr,虽然看起来一样,但发生了一点改变, 导致无法转换
// '0x00' is invalid after a single JSON value. Expected end of data. LineNumber: 0 | BytePositionInLine: 110.