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

你好,请教一下,我这边碰到和java的加密对接,我无法解密他们的内容 #3

Open
Ruan1979 opened this issue Jan 21, 2022 · 1 comment

Comments

@Ruan1979
Copy link

Ruan1979 commented Jan 21, 2022

private static final String     RSA_CIPHER_KEY_ALG = "RSA/ECB/OAEPWithSHA-256AndMGF1Padding";
private static final String     RSA_KEY_ALG        = "RSA";
private static final int        KEYSIZE            = 2048;
private static final String     COMMON_DECODE      = "UTF-8";
private static final String     RSA_SIGN_ALG       = "SHA256WithRSA";

这是java代码的rsa加密配置,我这边同样也用cipher去加密,java解不了,java传给我的,我也解不了,感觉是BASE64不一致问题,是不是byte的不一致导致的?

@hyfree
Copy link

hyfree commented Jan 21, 2022

建议使用相同的加密参数,追踪一下过程值

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