Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

des不加密 解密返回nil #1

Open
zhangxin2012 opened this issue Jan 9, 2018 · 1 comment
Open

des不加密 解密返回nil #1

zhangxin2012 opened this issue Jan 9, 2018 · 1 comment

Comments

@zhangxin2012
Copy link

您好,我这边由第三方加密 我自己这边解密。发现调用des.lua解密不了 直接返回nil 请问有解决方式吗?
源码看了下 表示看不懂 - -!
希望能得到您的回复。
代码:
local key ="QH8aYq4d"
local salt =nil
desMod,err = des:new(key,salt)
local result = desMod:decrypt("780d5486e73a75cc5b535e705d8fe6fd078b65cd5bcd15a5")
得到的result为nil
应该解出来的result为121235/UuYsC3282
对了源码cipher我默认改为了cbc模式

@lilien1010
Copy link
Owner

这里可以看下 desMod,err = des:new(key,salt) 的err 返回了什么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants