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

请教个sm4问题。 #63

Closed
l42111996 opened this issue Feb 24, 2022 · 3 comments
Closed

请教个sm4问题。 #63

l42111996 opened this issue Feb 24, 2022 · 3 comments

Comments

@l42111996
Copy link

我用java版本生成的加密后数据比c++版本的要长一段,这个可能是什么问题
输入
0123456789abcdeffedcba98765432101122336789abcdeffedcba987633221123450000000000000000000000000000
key
byte[] key = { 0x01,0x23,0x45,0x67, (byte) 0x89, (byte) 0xab, (byte) 0xcd, (byte) 0xef, (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98,0x76,0x54,0x32,0x10 };
输出
681edf34d206965e86b3e94f536e424695f8e303d44b9af26df04779c6db54a8cf428d0ced3b19f34786e0d03cd021ff002a8a4efa863ccad024ac0300bb40d2

c版本输出为
681edf34d206965e86b3e94f536e424695f8e303d44b9af26df04779c6db54a8cf428d0ced3b19f34786e0d03cd021ff

@greenking19
Copy link

pkcs#7跟pkcs#5的却别

@ZZMarquis
Copy link
Owner

C++版本是哪个呢?

@l42111996
Copy link
Author

我也不知道什么版本,不好的问题就把问题解决了,我让他把加密去掉了,不考虑了,感谢大佬

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

3 participants